Message241521
An AttributeError is raised when starting a new process with an object defined in the interactive interpreter
>>>def test():print "test"
>>>test()
test
>>>from threading import Thread
>>>Thread(target=test).start()
test
>>>from multiprocessing import Process
>>>Process(target=test).start()
<traceback, ending with>
File <path to python>/Lib/pickle.py, line 1126, in find_class
klass = getattr(mod, name)
AttributeError: 'module' object has no attribute 'test'
running similar code in a file works and does not raise an error. |
|
Date |
User |
Action |
Args |
2015-04-19 17:21:02 | ppperry | set | recipients:
+ ppperry |
2015-04-19 17:21:01 | ppperry | set | messageid: <1429464061.97.0.0459539459978.issue24006@psf.upfronthosting.co.za> |
2015-04-19 17:21:01 | ppperry | link | issue24006 messages |
2015-04-19 17:21:01 | ppperry | create | |
|