Saw here:
http://xsisupport.wordpress.com/2010/10/24/python-importing-modules-into-plugins/
...that I'm supposed to import from within my custom command? Not in the
beginning of my file like I was doing.

Are we really supposed to import (our module freshly added to the PATH) on
every command we use it in? That sounds silly.


On Fri, May 18, 2012 at 5:57 PM, Alan Fregtman <alan.fregt...@gmail.com>wrote:

> Why is it that __sipath__ isn't set most of the time?
>
> Docs say:
>
>
> import siutils
> # Add this plug-in path to python path
> siutils.add_to_syspath(__sipath__)
>
> but it errors! :(
>
> #   File "<Script Block >", line 29, in <module>
> #     siutils.add_to_syspath(__sipath__)
> # NameError: name '__sipath__' is not defined
> #
>
>
>
>
> I'm trying to load a Python module in the same folder as the plugin. I
> can't use Application.Plugins(PLUGIN_NAME).OriginPath until the plugin is
> registered, and __sipath__ doesn't really work, so what else can I try?
>
> Any help appreciated.
> Cheers,
>
>   -- Alan
>
>

Reply via email to