En Tue, 02 Jun 2009 06:11:30 -0300, Vlastimil Brom
<[email protected]> escribió:
[...] just in case the main problem would be the
use of __file__ ...
It seems, that the exe files generated from py2exe don't recognise
this variable;
sometimes I used code like
try:
__file__
except NameError: # py2exe
__file__ = sys.path[0]
I think you meant __file__ = sys.argv[0]
cf. e.g.
http://mail.python.org/pipermail/python-list/2001-May/085384.html
That's a rather old post. The "right" way to obtain a resource from a
package is using pkgutil.get_data(), and py2exe should support it by now.
(I haven't tested, but I think it does).
http://docs.python.org/library/pkgutil.html
--
Gabriel Genellina
--
http://mail.python.org/mailman/listinfo/python-list