Actually further to my previous comment, I am about 90% certain Jython doesn't cache as I sometimes re-load externally modified Jython scripts and they get correctly re-loaded (ie I see the changes) if Jython cached them, then I wouldn't.
-----Original Message-----
From: Yanick Duchesne [mailto:yduchesne@newtradetech.com]
Sent: 22 July 2002 16:56
To: jython-users@sourceforge.net
Subject: [Jython-users] questions about Jython

As a Jython newbie, I have a few questions:
 
1) PythonInterpreter and thread-safety
 
Can a single PythonInterpreter be used by multiple threads? I mean, could I keep an PythonInterpreter in a singleton for example, and have it interpret py files for multiple simultaneous threads?
 
2) PythonInterpreter and dynamic byte-code
 
Is the transformation of a jython source file to byte-code automatic whenever the eval(...) or exec(...) methods are called? Is the byte-code systematically cached so that a second invocation (for a given script) will be spared the source-to-byte-code generation overhead? What are the exceptions to the rule that one should be aware of?
 
The public void execfile(java.io.InputStream s) method of PythonInterpreter does not take any file name; how does the interpreter manage the caching in such a  case - how does it now a given source has already been interpreted?
 
3) 
 

Yanick Duchesne
Software Architect
Architecte d'applications
Newtrade Technologies Inc.
yduchesne@newtradetech.com
tel +1 514 286 8180 x 226




If you have received this message in error, please notify the sender immediately and delete the original without making a copy, disclosing its contents or taking any action based thereon.
Si vous avez reçu ce message par erreur, veuillez en aviser immédiatement le signataire et effacer l'original, sans en tirer de copie, en dévoiler le contenu ni prendre quelque mesure fondée sur celui-ci.