Python-Py2exe错误 问题:
我不能在.exe文件中使用py2exe。我只能在.py文件中使用它 当我在shell窗口中执行它时,它工作,但当我编译应用程序时,它不工作 以下是我正在使用的代码: 错误代码Python-Py2exe错误 问题:,python,python-2.7,py2exe,Python,Python 2.7,Py2exe,我不能在.exe文件中使用py2exe。我只能在.py文件中使用它 当我在shell窗口中执行它时,它工作,但当我编译应用程序时,它不工作 以下是我正在使用的代码: 错误代码 print "importing..." import wx import py2exe import sys import os from distutils.core import setup sys.argv.append('py2exe') print "done" class
print "importing..."
import wx
import py2exe
import sys
import os
from distutils.core import setup
sys.argv.append('py2exe')
print "done"
class Frame(wx.Frame):
def OnClick0(self, event):
print "building application..."
setup(
windows = (['windows.py']),
)
def __init__(self, parent, ID, title, pos=wx.DefaultPositin, size=((640,480)), style=wx.DEFAULT_FRAME_STYLE):
wx.Frame.__init__(self,parent, ID, title, pos, size, style)
panel = wx.Panel(self)
button = wx.Button(panel, label="Install")
self.Bind(wx.EVT_BUTTON, self.OnClick0, button)
def main():
app = wx.App();
frame = Frame(None, -1, 'Python Compressor Minimal');
frame.Show()
app.MainLoop()
if __name__ == "__main__":
main()
error: invalid command 'bdist'