[api-dev] Re: using external libraries with Pyuno components
Hi Paolo, i don't know, i am still no Python expert :-( But maybe it is possible to expand the sys.path variable with a directory in the oxt package. Something like OXT_DIR = 'oxt_root/external/' import sys if OXT_DIR_DIR not in sys.path: sys.path.append(OXT_DIR) If it is not possible, it sounds like a useful enhancement ;-) The question is would be who can make it and when ... Juergen On 3/17/11 2:12 AM, Paolo Mantovani wrote: Hallo, I'm developing a tool in python that perform some very basic image manipulation. The tool uses the Python Imaging Library (PIL) Now I would like to integrate my tool in OOo as a pyuno component, but PyUno comes without the PIL library Is there any way to deploy such a dependence inside my extension? or as an alternative: perhaps pyuno contains a module/library providing some basic (raster) image manipulation functions? thanks for any help Paolo M -- - To unsubscribe send email to dev-unsubscr...@api.openoffice.org For additional commands send email to sy...@api.openoffice.org with Subject: help -- - To unsubscribe send email to dev-unsubscr...@api.openoffice.org For additional commands send email to sy...@api.openoffice.org with Subject: help
[api-dev] Re: using external libraries with Pyuno components
Hi paolo long time !!! i put my imported .py file inside the extension in a pythonpath directory the main .py files are at extension root i found this information long time ago and think it is a reserved directory name no declaration in manifest.xml HTH laurent -- - To unsubscribe send email to dev-unsubscr...@api.openoffice.org For additional commands send email to sy...@api.openoffice.org with Subject: help
[api-dev] Re: using external libraries with Pyuno components
Hi Laurent, Juergen, thanks for prompt reply, Il 17/03/2011 14:39, Laurent Godard ha scritto: Hi paolo long time !!! i put my imported .py file inside the extension in a pythonpath directory the main .py files are at extension root i found this information long time ago and think it is a reserved directory name no declaration in manifest.xml True, I was aware of this feature and I'm already using in order to split my pyuno components in more modules. Actually I've expressed my question very poorly. The fact is that Image library (PIL) looks quite complicated. It contains python modules beside c code that is platform dependent. so I'm not sure of the path to follow in order to compile and include the library in my extension. Perhaps I should address the question to PIL authors/mantainers... However, if there is an alternative for not using that library I'd be happy. In substance I need to load an image (*.jpg) and with a nested cycle (rows / columns) I need to look for pixels having certain colors. After that, I need to clip the original image in many thumbnails Perhaps is that possible using OOo API's ? ciao Paolo M -- - To unsubscribe send email to dev-unsubscr...@api.openoffice.org For additional commands send email to sy...@api.openoffice.org with Subject: help