1from multiprocessing import Process
2import sys
3import time
4
5def say_hello(name='world'):
6 print "Hello, %s" % name
7 print 'Starting:', p.name, p.pid
8 sys.stdout.flush()
9 print 'Exiting :', p.name, p.pid
10 sys.stdout.flush()
11 time.sleep(20)
12
13p = Process(target=say_hello)
14p.start()