Hi, please help me to find a solution to run this program correctlly or tell me my basic mistake.
import thread import threading import time from jpype import * def sleepFunction(): print"ya ali" classpath = "-Djava.class.path=praat.jar" startJVM(getDefaultJVMPath(),"-ea",classpath) Formant=JPackage("praat").Formant s=Formant("iia-001-000.Formant") w=s.getF2_frequency() print w shutdownJVM() for i in range(1): thread.start_new_thread(sleepFunction, ()) time.sleep(1) print "goodbye!" The result is ya ali ya ali Unhandled exception in thread started by <function sleepFunction at 0x00BFE370> Traceback (most recent call last): File "C:\Downloads\_extracted\py_threading.zip.extracted\py_threading\sle.py", line 19, in sleepFunction startJVM(getDefaultJVMPath(),"-ea",classpath) File "D:\Python25\Lib\site-packages\jpype\_core.py", line 43, in startJVM _jpype.startup(jvm, tuple(args), True) RuntimeError: Unable to start JVM at src/native/common/jp_env.cpp:54 Unhandled exception in thread started by <function sleepFunction at 0x00BFE370> Traceback (most recent call last): File "C:\Downloads\_extracted\py_threading.zip.extracted\py_threading\sle.py", line 19, in sleepFunction startJVM(getDefaultJVMPath(),"-ea",classpath) File "D:\Python25\Lib\site-packages\jpype\_core.py", line 43, in startJVM _jpype.startup(jvm, tuple(args), True) RuntimeError: Unknown Exception goodbye! Thanks a lot. -- View this message in context: http://www.nabble.com/Please-help-help-.....-for-threading-tp15492998p15492998.html Sent from the Python - python-list mailing list archive at Nabble.com. -- http://mail.python.org/mailman/listinfo/python-list