On 04/06/10 08:05, Neven Goršić wrote:
> OK, I will describe my "case".
> 
> I use menu date stored in list "shape" in file CMFlowData.py in the same
> directory as my main program x.py. In the beginning of the program I
> have command:
> 
> import CMFlowData
> 
> and everything works fine till I make executable with py2exe. There are
> no error during "compilation" and exe are created in ...\dist directory.
> I copy all my external files to that directory, together with
> CMFlowData.py file, but when I run x.exe I get x.exe.log file with message:
> 
> Traceback (most recent call last):
>   File "x.py", line 8, in <module>
> ImportError: No module named CMFlowData
> Traceback (most recent call last):
>   File "x.py", line 8, in <module>
> ImportError: No module named CMFlowData
> 
> All other files that I read from disk are created with relative paths
> and work fine, except when I import
> my own module.
> 
> Is there some procedure to "announce" my module to the Python or System?

I've never used py2exe myself, but from what I can gather py2exe should
be able to collect the imported modules automatically. Did you follow
everything in the py2exe tutorial:
http://www.py2exe.org/index.cgi/Tutorial ? Are there any deviations of
the things you did from the tutorial?

_______________________________________________
Tutor maillist  -  Tutor@python.org
To unsubscribe or change subscription options:
http://mail.python.org/mailman/listinfo/tutor

Reply via email to