Executing a jpython script in another process
Barry A. Warsaw
bwarsaw at cnri.reston.va.us
Wed Oct 13 18:34:36 EDT 1999
>>>>> "CO" == Carlos Ors <cors at recercai.com> writes:
CO> I'm working with Jpython 1.1 beta 3 I'm interested in
CO> executing a jpython script in a new process so that a
CO> System.exit(0) didn't close the main aplication.
CO> I have a instance of PythonInterpreter named theInterp.
CO> I do:
CO> PythonInterpreter theInterp= new PythonInterpreter()
CO> theInterp.exec("<my script code>")
CO> I want to call the exec method making a new process and that
CO> the main process get the results of the execution.
I don't think you can really do this without some kind of interprocess
communication. System.exit() unconditionally terminates the JVM --
this is a Java thing that has nothing to do with JPython. Or do you
mean Python's sys.exit()?
BTW, the best place to discuss JPython issues is
jpython-interest at python.org. See
http://www.python.org/mailman/listinfo/jpython-interest
for details about the mailing list.
-Barry
More information about the Python-list
mailing list