Có ai biết làm thế nào để tạo ra một exe với py2exe chạy mà không có giao diện điều khiển màu đen? và gộp tất cả các tệp pyd thành một tệp exe?Thực hiện chạy exe py2exe mà không cần bàn điều khiển?
15
A
Trả lời
1
Đối với một tập tin exe, sử dụng thiết lập này (lấy từ this answer):
from distutils.core import setup
import py2exe, sys, os
sys.argv.append('py2exe')
setup(
options = {'py2exe': {'bundle_files': 1, 'compressed': True}},
windows = [{'script': "single.py"}],
zipfile = None,
)
1
from distutils.core import setup
import py2exe, sys, os
sys.argv.append('py2exe')
setup(
windows = [{'script': "pytho.py"}],
)
sửa để hỗ trợ x64 py2exe 64-bit không có nén
sử dụng: python 2.7 amd64