suppose i have imported two modules foo and bar with
foo=PyImport_ImportModule("foo") and bar=PyImport_ImportModule("bar")
respectively.

Now suppose I have an artitrary python expression to evaluate.
Do I need to parse that thring and check for foo. and bar. before
jumping the usual
PyModule_GetDict,PyDict_GetItemString,PyObject_CallObject hoop hoop on
the PyObject for
the prefix or there is a better way?

btw PyRun_SimpleString("foo.baz()"); does not work:
 Traceback (most recent call last):
  File "<string>", line 1, in ?
NameError: name 'foo' is not defined

and i potentially need a PyObject* back with the result of the
expression anyway.

-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to