py2exe 0.5.0 and data_files

Ulrich Goertz u at g0ertz.de
Sat Mar 20 04:05:57 EST 2004


Josiah Carlson <jcarlson at nospam.uci.edu> writes:

> Try the following [...]

Thanks for your suggestion. I see that I can get around this 
problem by analyzing sys.path[0] and proceeding case by case.
However, my understanding is that it should not be necessary
for the application to "know" that it will be packaged by
py2exe later. In other words, why does py2exe "change"
sys.path[0]? Or, if this change is justified (and it may well
be), maybe my application shpuld not use sys.path[0] but a
different way to find out the path where it resides?

In addition, since this change in the behavior of py2exe forces
me to change the Python application which I want to package
itself, I am asking myself whether there are other changes that
have to be made but which are not as obvious as this one.

(All this is not meant as criticism towards py2exe; it is a
great program. But I would like to improve my understanding
of its behavior, and of what is the right thing to do in my
application.)

Ulrich



More information about the Python-list mailing list