On Wed, 14 Nov 2007, Pete wrote:
It seems that initializing the Java VM breaks KeyboardInterrupt. After each
of the following prompts I hit ^C. After initializing the JVM (3rd line),
hitting ^C exits the interpreter. It also seems to leave my terminal a bit
messed up - I can't see what I type until I do a `reset`.
[EMAIL PROTECTED]:~$ python
Python 2.5.1 (r251:54863, Oct 5 2007, 13:36:32)
[GCC 4.1.3 20070929 (prerelease) (Ubuntu 4.1.2-16ubuntu2)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
KeyboardInterrupt
import lucene
KeyboardInterrupt
lucene.initVM(lucene.CLASSPATH)
<jcc.JCCEnv object at 0xb7d80210>
[EMAIL PROTECTED]:~$
Wow, neat :)
That's unexpected.
Other signal handling appears to work ok tho:
[EMAIL PROTECTED]:~$ python
Python 2.5.1 (r251:54863, Oct 5 2007, 13:36:32)
[GCC 4.1.3 20070929 (prerelease) (Ubuntu 4.1.2-16ubuntu2)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
import signal
def handler(foo, bar):
... print "got a signal!"
...
signal.signal(signal.SIGUSR1, handler)
0
got a signal!
import lucene
lucene.initVM(lucene.CLASSPATH)
<jcc.JCCEnv object at 0xb7d40210>
got a signal!
Your workaround doesn't seem to work on Leopard.
Maybe, there is an initVM() config parameter than can help ?
On Mac for example, initVM(CLASSPATH, vmargs='-Xrs') seems to solve the
problem.
Andi..
_______________________________________________
pylucene-dev mailing list
[email protected]
http://lists.osafoundation.org/mailman/listinfo/pylucene-dev