Actually Vincent is talking about the ruby macro. The python macro implementation is Jython (through JSR223) that you can find on http://jython.org/. Some ideas: It might be enough to just put the egg file of the module you need directly in WEB-INF/lib since Jython is scanning the classpath (renaming .egg to .jar might help depending on the application server). If that does not work then you will need to create a proper jar (with MANIFEST and all) and put in it whatever the .egg file contains (that's pretty much what I did for the Pygments module). In any case you should get more accurate information by asking Jython guys. On Thu, May 26, 2016 at 8:26 AM, Vincent Massol <[email protected]> wrote:
Hi Sebastian,
On 26 May 2016, at 02:17, Sebastian Schafer <[email protected]> wrote:
Hi, I'm trying to import some packages into the Python macro on Xwiki 7.2, and while standard packages import fine (working with os and re, etc.), some (like xlrd) don't. Looking through the scripting guide and macro documentation I could not figure out how the Python macro actually works. Is it just a collection of bindings and translates the python script into groovy or something else, or is it calling the local Python installation? This might sound stupid, but I thought the latter was the case and this would limit the available packages (the ones I want to load are installed locally).
We’re using jruby through JSR223 (java scripting api).
Maybe https://github.com/jruby/jruby/wiki/ApplicationsAndLibraries can help?
Once you find out how to do it, it’ll be interesting if you could document it on http://extensions.xwiki.org/xwiki/bin/view/Extension/Ruby+Macro
Thanks -Vincent
Thank you
Sebastian
_______________________________________________ users mailing list [email protected] http://lists.xwiki.org/mailman/listinfo/users
-- Thomas Mortagne