[Py2exe-users] Re: How to add a package loaded at run time
by Thomas Heller other posts by this author
Jun 18 2004 11:24AM messages near this date
[Py2exe-users] Re: How to add a package loaded at run time
|
Re: [Py2exe-users] How to add a package loaded at run time
"Bruno Santos" <bmsantos@[...].es> writes:
> Hi Tacao,
>
> Thanks for your prompt answer, but unfortunatly is still not working.
> All the glob does is to easy the copy of ".py" or ".pyc" files into the
> subdirectory "pool".
>
> It fails when I try to import a .py file stored in the "pool" module directory.
>
> try:
> myModule = __import__("pool.classnode", globals(), locals(), ["getNodeInfo"])
> except ImportError, aError:
> print aError
>
> So, I get a error message of : "No module named pool.classnode"
>
> This makes me beleive that it is something related in the way that py2exe stores
> the module information. Therefore I'm still stucked with the same problem.
I think it is because the *only* entry in sys.path is the library.zip
file.
See <http://starship.python.net/crew/theller/moin.cgi/Py2exeEnvironment>
You should probably in your script check for the sys.frozen attribute,
and extend sys.path yourself.
Thomas
-------------------------------------------------------
This SF.Net email is sponsored by The 2004 JavaOne(SM) Conference
Learn from the experts at JavaOne(SM), Sun's Worldwide Java Developer
Conference, June 28 - July 1 at the Moscone Center in San Francisco, CA
REGISTER AND SAVE! http://java.sun.com/javaone/sf Priority Code NWMGYKND
_______________________________________________
Py2exe-users mailing list
Py2exe-users@[...].net
https://lists.sourceforge.net/lists/listinfo/py2exe-users
Thread:
Bruno Santos
Greg
Thomas Heller
E. A. Tacao
Bruno Santos
|