[FRPythoneers] Compiling Python with jythonc - runtime problem
david.heiser at intelliden.com
Fri Jan 23 11:08:14 MST 2004
I maintain a suite of Python programs for internal use in my company. Using
the Jython compiler, I have compiled a subset of these programs in a .jar
file for external use.
Generally, things have gone well, but there seem to be a few key functions
that do not translate.
One is the KeyboardInterrupt exception. The Python programs trap the
KeyboardInterrupt to allow the user to enter Ctl-C to skip a step and move
on, or in some cases, to provide an elegant, controlled exit. When compiled
into a .jar and run under java, a Ctl-C causes the programs to exit straight
to the command prompt. Sometimes generating an obscure java traceback.
Does anyone have an idea how I can get around this problem and re-activate
the Ctl-C features in the compiled code?
Test code -
from time import sleep
print "\n\n PROGRAM INTERRUPTED\n"
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the FRPythoneers