Le mardi 19 août 2008 à 16:33 -0400, MPJ Grégoire a écrit :
> I've been writing a Python plugin containing functions for the
> structural analysis of beams.  Since each function is rather long and
> complicated, I would prefer to use multiple files each containing a
> few functions, rather than one file with many functions.  After some
> poking at plugin.xml, it seems to me that the simplest way to achieve
> my goal is to have plugin.xml refer to wrapper.py, and then use
> wrapper.py to import the separate files.
> 
> But my import statements don't run correctly in Gnumeric.  While I can
> import modules from standard Python locations on the system, files in
> the local directory aren't recognised.  This seems to be because the
> sys.path doesn't include the local directory.  The obvious solutions
> of appending the local directory to sys.path within wrapper.py don't
> seem to work either.
> 
> How can I change the sys.path settings for Python plugins running
> within Gnumeric?
> 
> Alternatively, is there a way that I can change plugin.xml so that it
> will load functions from multiple Python files?
> 
> Many thanks for your help.
> 
> Marc Grégoire

I'm not a python expert, but anyway, I think that our plugins mechanism
can't load several files. You might use several plugins (one for each
file) if the files are independents or rewrite the whole thing in C.

Best regards,
Jean

_______________________________________________
gnumeric-list mailing list
[email protected]
http://mail.gnome.org/mailman/listinfo/gnumeric-list

Reply via email to