py2exe problem

Aaron Held aaron at metrony.com
Thu Feb 19 23:55:40 EST 2004


py2exe needs to find all of the modules associated w/ your application 
and bundle them in the new package.  That error means that it missed the 
module staic box.

you need to help py2exe find the files you need.

It may also be that staticbox is created on the fly from a resource 
file. Looking at the pythoncard example
http://cvs.sourceforge.net/viewcvs.py/pythoncard/PythonCardPrototype/samples/minimalStandalone/setup.py?rev=1.1&view=auto
you may need to add something like

 data_files = [ (".", ["readme.txt", "minimal.rsrc.py"]) ]
to your setup.py.

I don't use pythoncard, but this may help.

-Aaron



Tim Axtelle wrote:

>Yeah.  Sorry about the brain fart.  Yes, I can get ptest.exe and run.  I can
>also get my program to generate the appropriate .exe file.  However, I get
>this error message:
>
> "Import error: cannot import module 'staticbox"
>
>Staticbox is a module in Pythoncard, the GUI that I used.  I am not sure
>about the ' before staticbox.  How can I import this module?
>
>Thanks so much for your patience.
>
>Tim
>
>----- Original Message ----- 
>From: "Aaron Held" <aaron at metrony.com>
>To: "Tim Axtelle" <tim at axtelle.com>
>Sent: Thursday, February 19, 2004 7:56 PM
>Subject: Re: py2exe problem
>
>
>  
>
>>try running it from the command line.
>>If you click on it, the program executes and then the console window
>>closes. That is normal windows behaviour.
>>
>>-Aaron
>>
>>Tim Axtelle wrote:
>>
>>    
>>
>>>Aaron,
>>>
>>>Thanks for your reply.  I tried to run py2exe on the test code.
>>>Running the resulting .exe simply opens a window that immediately
>>>closes.
>>>
>>>Thanks,
>>>
>>>Tim Axtelle
>>>      
>>>
>>
>>    
>>
>
>  
>



More information about the Python-list mailing list