thread is a low-level threading module, and start_new is deprecated.
Aside from that, thread.start_new(test.()) is syntaxically wrong (a
pair of brackets can't follow a dot). However, your example does work
for me once I fix the syntax, and it prints hello but then hangs. I
can't explain the other results, though - possibly undefined behaviour
or more likely me not having much experience with the low-level thread
interface.

Use threading instead, like so:

import threading

def test():
    print 'Test successful!'

def main():
    thread = threading.Thread(target = test)
    thread.start()

main()

-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to