Hi.

Installed Mobile Web Server on my N97 which comes with python version 1.4.5. Have the following script placed on the mobile web server. Whenever it tries to create the thread there is a panic (py_some-number) and the thread never seems to run.

Is there any problem with the code below. Is there any thread creation issue with 1.4.5 version of python.

Code:
from mod_python import apache, util
import time
import thread
import e32

def mythread():
    while 1:
    	apache.log_error("In mythread ...")
    	time.sleep(1)

def handler(req):

    if req.uri == '/msg_services/im/receive':
    	apache.log_error("Before thread ...")
	tid = thread.start_new_thread(mythread, ())
    	apache.log_error("After thread ...")
	while 1:
	    apache.log_error("In main ...")
	    time.sleep(1)
    	return apache.OK

    # Not found
    return 404
Thanks
Mahesh