This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author mark.dickinson
Recipients frobnitzem, mark.dickinson
Date 2012-05-01.19:16:35
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1335899796.14.0.0190359542865.issue14704@psf.upfronthosting.co.za>
In-reply-to
Content
Thanks for the report.

This is expected behaviour.  It isn't actually anything to do with multiprocessing;  it's to do with invoking exec from within a function scope.  You can see the same effect with code like this:


code = """\
def show_name():
    print my_name
show_name()
"""

def run():
    my_name = "me"
    exec code

run()


See

http://docs.python.org/reference/executionmodel.html#interaction-with-dynamic-features

for more explanation.
History
Date User Action Args
2012-05-01 19:16:36mark.dickinsonsetrecipients: + mark.dickinson, frobnitzem
2012-05-01 19:16:36mark.dickinsonsetmessageid: <1335899796.14.0.0190359542865.issue14704@psf.upfronthosting.co.za>
2012-05-01 19:16:35mark.dickinsonlinkissue14704 messages
2012-05-01 19:16:35mark.dickinsoncreate