I am the maintainer of jpydebug (http://jpydbg.sourceforge.net) which
is a Python debugger jedit pluggin ; I got some enhancement request
in order for the debugger to support Jython as well. So I am on my
way to make jpydebug beeing a cross (CPython / Jython ) debugger for
its next release.
During this development I found a tiny limitation : At a given stage
for PYTHON PATH checking helper,the GUI end debugger need make an
import ... but without the initial call to the imported module.
I encapsulate an instance of jython interpretor as a starting point
and uses the available imp.java public importname semantics , and for
the moment I patched the module by adding static global boolean flag
/** set to true import semantics without initial call to module */
public static boolean checkImportModeOnly =3D false ;
and prevent the call to happen whenever this flag is set
if ( ! checkImportModeOnly ) code.call(f);
This works of course and is simple although not elegant at all from
my standpoint at least from a reentrancy standpoint. Adding an extra
boolean parameter to misc involved method offers better reentrancy
but is still cumbersome
I don't know either if from a Jython standpoint this kind of patch is
acceptable, since it's not part of PYTHON language rule but for
Debugger semantics It's a real help to be able to have access to the
low level semantics of a module when you're inside a Java environment
, this direct access it also spare CPU cycles
So let me know what are your thoughts on this patch, or if there is a
different way to get a PyModule instance loaded back without call to
the initial call.
Thanks And happy new year to all of you
Envie de discuter gratuitement avec vos amis ?
Téléchargez Yahoo! Messenger http://yahoo.ifrance.com
Get latest updates about Open Source Projects, Conferences and News.