New submission from ppperry:

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.

----------
components: Interpreter Core, Library (Lib)
messages: 241521
nosy: ppperry
priority: normal
severity: normal
status: open
title: Multiprocessing fails when using functions defined in interactive 
interpreter.
type: behavior
versions: Python 2.7

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue24006>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to