From: Gregory P. <gpe...@gr...> - 2005-06-27 13:02:46
|
Hi, we developed a project in Python and want to convert it to an exe. How easy is it. We used packages like The Twisted Framework for networking, Pygame, TKinter for the menu. Should one write a text file for each source code file or application? Is py2exe the best option to use? Regards Greg |
From: Michael F. <mi...@pc...> - 2005-06-27 13:19:38
|
Gregory Pereira wrote: >Hi, > >we developed a project in Python and want to convert it to an exe. > >How easy is it. We used packages like The Twisted Framework for >networking, Pygame, TKinter for the menu. > > > It is generally very easy to use and difficulties are actually reasonably rare. *However* - I know that there are issues with at least Pygame of the packages you list above. There is a separate script (available from the Pygame website) for using Pygame with py2exe. Tkinter is pretty striaghtforward - I've used py2exe on a couple of projects that use it, and it 'just worked'. I have no experience with Twisted and py2exe, my guess is that you have problems then several people on the Twisted mailing list will have tried it. The main problems you may experience are where installed packages use the Windoze registry - it's obviously impossible for py2exe to pick up on this. You may have to contact the package maintainer for this. This only applies to wrapped C/C++ packages. (Which Pygame and Twisted both are I think - and I guess include other packages like openGL/SSH support which is probably through wrapped DLLs). >Should one write a text file for each source code file or application? > > > One 'setup.py' per application is usually the way... >Is py2exe the best option to use? > > > Yes ! Much easier than other options. For *testing* purposes, Movable Python can be handy. It is a py2exe built environment that will run other python scripts. If a script runs with this (*preferably* on another machine of course !) then it will almost certainly work py2exe'd. Best Regards, Fuzzy http://www.voidspace.org.uk/python >Regards > >Greg > > >------------------------------------------------------- >SF.Net email is sponsored by: Discover Easy Linux Migration Strategies >from IBM. Find simple to follow Roadmaps, straightforward articles, >informative Webcasts and more! Get everything you need to get up to >speed, fast. http://ads.osdn.com/?ad_id=7477&alloc_id=16492&op=click >_______________________________________________ >Py2exe-users mailing list >Py2...@li... >https://lists.sourceforge.net/lists/listinfo/py2exe-users > > > > > |
From: RayS <ra...@bl...> - 2005-06-27 14:26:45
|
At 06:19 AM 6/27/2005, Michael Foord wrote: >Gregory Pereira wrote: > >Tkinter is pretty striaghtforward - I've used py2exe on a couple of projects that use it, and it 'just worked'. I have also found that the majority of the time, it does just magically compile. >The main problems you may experience are where installed packages use the Windoze registry - it's obviously impossible for py2exe to pick up on this. You may have to contact the package maintainer for this. This only applies to wrapped C/C++ packages. (Which Pygame and Twisted both are I think - and I guess include other packages like openGL/SSH support which is probably through wrapped DLLs). If you have issues, try -xref to see what is included/refed, and use explicit include when needed to grab something it misses. The example setup.py files are best to start with and modify. >>Should one write a text file for each source code file or application? >> >One 'setup.py' per application is usually the way... Yes, and you can also compile multiple exes with one script, see samples and Tom's post. >>Is py2exe the best option to use? >> >Yes ! Much easier than other options. For *testing* purposes, Movable Python can be handy. It is a py2exe built environment that will run other python scripts. If a script runs with this (*preferably* on another machine of course !) then it will almost certainly work py2exe'd. I used to use McMillan, but py2exe is now preferred; and, needed for Python 2.4. Ray |
From: Thomas H. <th...@py...> - 2005-06-27 13:54:35
|
"Gregory Pereira" <gpe...@gr...> writes: > Hi, > > we developed a project in Python and want to convert it to an exe. > > How easy is it. We used packages like The Twisted Framework for > networking, Pygame, TKinter for the menu. > > Should one write a text file for each source code file or application? It depends. I have one setup.py file which creates 15 separate executables in one directory, each is about 30-60 kB in size, the python dll itself, and the common stuff in a 'lib' subdirectory has ~30 .pyd and .dll files, plus the .pyo module archive library.zip, which is 5MB compressed. The executables are a mix of COM exe servers, windows services, and a couple of normal windows gui programs. Thomas |