From: Werner F. B. <wer...@fr...> - 2009-04-22 08:15:23
|
Zwicky, William R ERDC-CERL-IL Contractor wrote: >> -----Original Message----- >> From: Werner F. Bruhin [mailto:wer...@fr...] >> Sent: Tuesday, April 21, 2009 3:09 AM >> >> Then I used Gui2Exe to generate a setup.py and it complained >> already during compiling that bnoise was not a module. > > Technically correct: bnoise is a package, not a module. A py file is a > module, a directory with an __init__.py in it is a package. (Without > __init__, a directory is just a directory.) > >> Then changed in Gui2Exe to define Utils as a package and at >> this point I can run BnoiseApp.py or the generated exe. > > Interesting, but my project structure is perfectly valid Python. Agree, but I never saw it in an application. I.e. I use Boa which uses lots of packages but the top folder is NOT a package and one can generate an .exe from it. Hopefully someone knowing more then we do can explain to use why there is a problem with this folder/package structure when using py2exe. Note that > with my setup.py, I'm trying to automate things so that py2exe grabs > everything without me having to list the files explicitly. If I recall, with > Gui2exe you need to list everything explicitly. The only thing I entered in Gui2Exe is the path to the main script and the packages to include (utils in this case). Frankly, I use Gui2Exe just to generate an "initial" version of setup.py and then adjust it for my shareware app - this is for me faster as I don't need to remember the setup.py structure as Gui2Exe does a very nice job in presenting them. I also think that it generates a setup.py which is nicely structured and can easily be adapted to ones own needs. Werner |