"python exe" and "py plugins"

Thomas Heller theller at python.net
Wed Nov 19 16:09:59 EST 2003


Ahmad Baitalmal <ahmad at bitbuilder.com> writes:

> marco wrote:
>> great ! it works with dynamic import ( __import__() )!
>> it's a lot better than an execfile ...
>> "Marc Boeren" <M.Boeren at guidance.nl> a écrit dans le message de news:
>> mailman.826.1069158322.702.python-list at python.org...
>
> I'm a bit lost, I'm trying to do the same thing withe BitLeaf
> (www.bitbuilder.com/bitleaf).
> I put all my pulgins in a folder named "services", then when the
> application loads it looks in that folder for any subfolders that have
> __init__.py in them (packages, that's how I plan to distribute the
> plugins).
>
> That works fine in linux or uncompiled on windows, but with py2exe, it
> can't find the "services" folder.

You should be a bit more specific here - what do you mean by "it can't
find the services folder" ?

I can only think of two problems - first you should locate the folder in
the file system (probably relative to the exe-file, which is
sys.executable), and then you should add it to sys.path.
Second, you must make sure that py2exe doesn't include this folder.

Thomas




More information about the Python-list mailing list