On 6/29/2009 11:57 AM, eliben wrote:
> Hello,
> 
> I'm distributing a fairly complex PyQt based application as a
> single .exe made by PyInstaller on Windows.
> 
> For some advanced users, I want to allow adding their own modules in a
> special "plugins" directory. These modules can enhance the way the
> application works in completely user-defined ways. However, there's a
> slight problem with this approach:
> 
> My application has to expose an API to these plugin modules. I'm not
> sure how the users should write the 'import' statements to make it
> work. After all, all there is for a user is a big .exe, and his
> module. Where will the module import the API code? Relatively?
> How can this be made to work? How should the user's imports be
> structured, or is there something special I have to tell PyInstaller
> when creating the .exe?

You should do absolutely nothing, it should work out of the box.

PyInstaller first searches for imports within the big .exe, and then 
look for them outside. If you bundle your API as a normal python package 
within the big .exe, by simply importing it somewhere, it will 
automatically be available for plugins.
-- 
Giovanni Bajo
Develer S.r.l.
http://www.develer.com

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"PyInstaller" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/PyInstaller?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to