Newbie question regarding py2exe.

Marco.LaRosa at csiro.au Marco.LaRosa at csiro.au
Thu Jul 24 19:48:59 EDT 2003


Hi all,

Firstly thanks for the responses. 
I should say that I am new to mailing lists also. I now realise I need to
provide more info than what I did : )

> Thomas said: Don't work in the py2exe directory.

I have been working well away from there.

> Ray says:
>That ment that the setup.py became as simple as ...
>
># setup.py
>from distutils.core import setup
>import py2exe
>
>setup(name="myscript",
>      scripts=["myscript.py"],
>)

My setup.py references only the very first module of the app. That is, the
module which sets the GUI event loop in motion.

In an earlier attempt, I explicitly listed all of the modules in the
setup.py file and some of them did compile. However, the process always died
when it got the first module. The module which gets the GUI going is simple,
standard python code. No special imports or anything other strange tricks.

I have tried converting a simple gui app using py2exe and it worked without
problems. However, when I try to compile my code, I get errors from
Modulefinder.py (They are definitely errors Thomas : )


The final error in the traceback is as follows:

File "C:\......\modulefinder.py", line 267, in load_module
	co = compile(fp.read()+'\n',pathname,\exec')
	File "<string>", line 357

SyntaxError: invalid syntax

I would include it all but I can't get it out of the dos command prompt
window (sorry, I usually develop on SGI - developing on windows is still new
to me)

The code I have developed is for modelling structure-activity relationships.
Ergo, it is quite complex. It uses Python (obviously), wxPython, Numeric,
and Chaco (for plotting). I don't think any of these packages is a problem
because the output tells me py2exe doesn't even make it to a module which
uses them.

Finally, I get the same error using the updated py2exe package.

The only other thing I can think of is the path. Does py2exe use the
PYTHONPATH environment variable?


Any ideas would be greatly appreciated.

Cheers, Marco





More information about the Python-list mailing list