PyObject_GetAttrString failing when getting a function pointe r fr om PyObject* returned by Py_CompileString

Borse, Ganesh ganesh.borse at credit-suisse.com
Tue Nov 20 22:09:03 EST 2007


> Can we not use the "PyObject*" returned by Py_CompileString as input to PyObject_GetAttrString?
> What could be wrong?
>>>per documentation
>>>compile string returns None when you use Py_file_input
This is not true. I am getting a valid code object returned when I am using "<stdin>" & Py_file_input.

-----Original Message-----
From: sndive at gmail.com [mailto:sndive at gmail.com] 
Sent: 21 November 2007 01:13
To: python-list at python.org
Subject: Re: PyObject_GetAttrString failing when getting a function pointer fr om PyObject* returned by Py_CompileString
> I want to use this function pointer returned by PyObject_GetAttrString as input to PyObject_CallObject.
> Can I use the "PyObject*" returned by Py_CompileString directly as is in call to PyObject_CallObject?
not with Py_file_input


==============================================================================
Please access the attached hyperlink for an important electronic communications disclaimer: 

http://www.credit-suisse.com/legal/en/disclaimer_email_ib.html
==============================================================================




More information about the Python-list mailing list