py2exe

Does PY2EXE Compile a Python Code to run Faster?

雨燕双飞 提交于 2019-12-20 03:15:16
问题 I really like the PY2EXE module, it really helps me share scripts with other co-workers that are super easy for them to use. My question is: when the PY2EXE module compiles the code into an executable, does the resulting executable process faster? Thanks for any replies! 回答1: py2exe just bundles the Python interpreter and all the needed libraries into the executable and a few library files. When you run the executable, it uses the bundled interpreter to run your script. Since it doesn't

Font module error when using pygame2exe

只愿长相守 提交于 2019-12-20 02:39:20
问题 I used Pygame2exe from the Pygame website and that got rid of the problem with the .dlls but there's still an error that remains. The only font I'm using is the standard pygame font ( freesansbold.ttf ) and I've included a copy of it in my game directory. Also, I'm using the Font class and not the SysFonts class which I thought would fix my problem. Any thoughts? C:\Python26\apple_orchard\dist\appleorchard.exe:27: RuntimeWarning: use font: MemoryLoadLibrary failed loading pygame\font.pyd

Ignoring library.zip in py2exe

时间秒杀一切 提交于 2019-12-20 02:38:09
问题 I need to have an executable file (.exe) which takes some parameters from a file which can be configured by the user depending on his/her need. Since i have created scripts in python, i have used py2exe to create that executable. Though i could place a configurable file called settings.dat as data file and use it to customize, i feel it would be better if the configurable file is python file (lets say settings.py ) and use it import the variables declared in it. So settings.py shouldn't be

Python win32 service

只愿长相守 提交于 2019-12-20 02:29:13
问题 I have a minimal python win32 service service.py that does nothing special: import win32serviceutil import win32service import win32event class SmallestPythonService(win32serviceutil.ServiceFramework): _svc_name_ = "SmallestPythonService" _svc_display_name_ = "display service" # _svc_description_='ddd' def __init__(self, args): win32serviceutil.ServiceFramework.__init__(self, args) self.hWaitStop = win32event.CreateEvent(None, 0, 0, None) def SvcStop(self): self.ReportServiceStatus

When using py2exe, PyQt application cannot load SQlite database

风格不统一 提交于 2019-12-19 11:24:16
问题 My PyQt application works fine when running on Linux, when in my Windows build environment, or frozen on the machine where it was build with py2exe. But after moving the frozen executable and its supporting files to another machine it can't load the database driver. It worked fine when I had Python2.5 and an earlier version of PyQt and py2exe. But after upgrading my toolchain I get these errors: dbname.open returns false lastError(dbname) is "Driver not loaded" I have an sqldrivers folder

Com server build using Python on 64-bit Windows 7 machine

天涯浪子 提交于 2019-12-19 09:46:37
问题 Original post is here: http://mail.python.org/pipermail/python-win32/2010-December/011011.html I am using: OS: 64 bit Windows 7 Professional Python: python-2.7.1.amd64 Python win32 extensions: pywin32-214.win-amd64-py2.7 Py2exe: py2exe-0.6.9.win64-py2.7.amd64 I am trying to build icon overlay for Windows. It has worked fine on 32 bit Windows but not working on 64 bit Windows 7. Here are the Python modules I have created for testing: test_icon_overlay.py: ( http://mail.python.org/pipermail

Why am I getting this ImportError?

这一生的挚爱 提交于 2019-12-19 09:11:17
问题 I have a tkinter app that I am compiling to an .exe via py2exe . In the setup file, I have set it to include lxml , urllib , lxml.html , ast , and math . When I run python setup.py py2exe in a CMD console, it compiles fine. I then go to the dist folder It has created, and run the .exe file. When I run the .exe I get this popup window. (source: gyazo.com) I then procede to open the Trader.exe.log file, and the the contents say the following; Traceback (most recent call last): File "Trader.py",

compiling a python program that uses pygame into an executable

雨燕双飞 提交于 2019-12-19 08:13:20
问题 I wanted to compile my python program that uses pygame into an executable using py2exe but I'm experiencing some problems. I run the script in the windows command line and it seems to work. It creates a dist directory but when I try to open the .exe file, it briefly opens a command line window and then doesn't do anything. Could this possibly be because I've used pygame and py2exe doesn't support it? Or do I need to put a copy of the pygame library into the same directory as my program? 回答1:

Is there a way to specify the build directory for py2exe

微笑、不失礼 提交于 2019-12-19 05:29:09
问题 I can set the final dist directory of py2exe using the command line: python setup.py py2exe -d "my/dist/dir" but I can't seem to set the file to use for the interim build directory. I've taken a brief look at the source, but unless I am missing something there doesn't appear to be any way to do it. 回答1: Any option that you can set on the command line you can set either through a setup.cfg file or in your setup.py file. -d is a shortcut for --dist-dir which you can add to the py2xe dict in the

Problem deploying Python program (packaged with py2exe)

a 夏天 提交于 2019-12-19 04:57:09
问题 I have a problem: I used py2exe for my program, and it worked on my computer. I packaged it with Inno Setup (still worked on my computer), but when I sent it to a different computer, I got the following error when trying to run the application: "CreateProcess failed; code 14001." The app won't run. (Note: I am using wxPython and the multiprocessing module in my program.) I googled for it a bit and found that the the user should install some MS redistributable something, but I don't want to