[ python-Bugs-1261714 ] precompiled code and nameError.

SourceForge.net noreply at sourceforge.net
Wed Aug 17 08:50:54 CEST 2005


Bugs item #1261714, was opened at 2005-08-17 13:50
Message generated for change (Tracker Item Submitted) made by Item Submitter
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=1261714&group_id=5470

Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: Python Interpreter Core
Group: None
Status: Open
Resolution: None
Priority: 5
Submitted By: Vladimir Menshakov (megath)
Assigned to: Nobody/Anonymous (nobody)
Summary: precompiled code and nameError.

Initial Comment:
i experienced problem with call'ing python unmarshalled
and eval'ed code. 

similar problem described in mailing list, but
unfortunately has not got any solution or work-around. 
http://mail.python.org/pipermail/c++-sig/2003-October/006094.html

actually I have code like this: 
-------------
import m

class A:
  def do(self): 
    print m.User().GetName()
------------
test.py
a = A() 
a.do()

running script from python works perfectly. but when I
call 'do' from c++ code I get following error : 
PyObject_CallMethod: exceptions.NameError:global name
'm' is not defined

I checked locals dictionary, it contains missing name
('m'). 


----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=1261714&group_id=5470


More information about the Python-bugs-list mailing list