Hi all.
pydev provides python scripting inside pydev. Is this scripting
available outside pydev?
I mean: if I develop a new plugin for Eclipse, is it possible to use
the python scripting abilities inside my plugin?
Hi Marco,
Yes, you should be able to use them without too much problem.
To use it, you'd have to do something like:
File[] dir = new File[]{scriptLocation}
IPythonInterpreter interpreter = JythonPlugin.newPythonInterpreter();
JythonPlugin.execAll(locals, "foo", interpreter, dir); //execute all the files that start with 'foo' that are located beneath the selected dir
You'd pass whatever you like as the locals (and use those variables in the script). In pydev I pass as locals the PyEditor and the command requested (such as initializing the editor, saving a file, closing, etc), so, when the editor is initalized, actions can be registered, etc.
Cheers,
Fabio
------------------------------------------------------------------------- Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________ pydev-code mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/pydev-code
