I would like to elaborate on Raghu's question.

I maintain a suite of Python programs for internal use in my company. Using jythonc, I have frozen a subset of these programs in a .jar file for external use.

The original Python programs trap the KeyboardInterrupt so the user may enter Ctl-C to skip a step and move on, or in some cases, to make an elegant, controlled exit. When frozen into a .jar and run under java, Ctl-C causes the programs to exit straight to the command prompt instead; sometimes generating obscure stack traces showing the line number as 0.

Does anyone have an idea how I can get around this problem and re-activate the Ctl-C features in the frozen code? I found some suggestions in the Jython-users archives, one of which could work with a significant code rewrite, but then that code doesn't function correctly in the native Python. I'd like to keep the differences between the native Python code and the frozen code source to a minimum.

Thanks,
Dave


> -----Original Message-----
> From: "Raghuram Devarakonda" <raghu@syncsort.com>
> To: "Jython" <jython-users@lists.sourceforge.net>
> Date: Mon, 26 Jan 2004 11:11:45 -0500
> Subject: [Jython-users] Jythonc Question...
>
>
> Hi,
>
> Since the time I bundled my jython modules as classes and into a jar file,
> all the stack traces show the line number as 0. Can someone explain why this
> is so? The jythonc web page mentions at the end the following:
>
> "
> Freezing modules:
> ------------------
> jythonc can also be used to freeze a python application. The frozen
> application can then be distributed and deployed as any other java
> application.
> Some diffrences between an interpreted application and a frozen application
> exists:
>
>         Properties are diffrent. XXX
>         sys.argv[0]
>         loading of python classes.
> "
>
> Can someone elaborate these differences?
>
> Thanks in advance,
> Raghu.