Sharing code between python plug-ins

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Sharing code between python plug-ins

centipede-3
Is there a way to share code between python-plugins? A file with common
classes and functions would greatly reduce work-overhead for me.

It would appear that the usual trick (i.e. from mycommonfile import *)
doesn't work as the python interpreter is based at the user home dir
(i.e. calling os.getcwd() returns '/home/username' or whatever). That
makes it a bit of a problem to import a file placed
at /home/username/.gimp-2.2/plug-ins, I think.

Any help appreciated.

Sincerely
Rene Jensen



_______________________________________________
Gimp-user mailing list
[hidden email]
http://lists.xcf.berkeley.edu/mailman/listinfo/gimp-user
Reply | Threaded
Open this post in threaded view
|

Re: Sharing code between python plug-ins

Carol Spears
On Thu, May 26, 2005 at 10:03:34PM +0200, Rene Jensen wrote:

> Is there a way to share code between python-plugins? A file with common
> classes and functions would greatly reduce work-overhead for me.
>
> It would appear that the usual trick (i.e. from mycommonfile import *)
> doesn't work as the python interpreter is based at the user home dir
> (i.e. calling os.getcwd() returns '/home/username' or whatever). That
> makes it a bit of a problem to import a file placed
> at /home/username/.gimp-2.2/plug-ins, I think.
>
> Any help appreciated.
>
http://carol.gimp.org/gimp2/resources/python/fontmap.html

carol

_______________________________________________
Gimp-user mailing list
[hidden email]
http://lists.xcf.berkeley.edu/mailman/listinfo/gimp-user