how to know argument name with which a function of extended c called
rahul
rahul03535 at gmail.com
Tue Apr 14 08:35:46 EDT 2009
Hi,
i need to write a 'c extension function' in this function i need to
change argument value with which this function called.
ie,
if a python code like
import changeValue as c
arg="old value"
c.changeValue(arg)
print arg
then it print "new value"
i write code like this..
static PyObject *changeValue(PyObject *self,PyObject *args){
PyObject *sampleObj, *m ;
char *argName;
if (!PyArg_ParseTuple(args, "O", &sampleObj)){
return NULL;
}
m = PyImport_AddModule("__main__");
PyObject_SetAttrString(m, argName, "new value");
return Py_BuildValue("");
}
But for this i need to know the argument name with which this function
called .
Is this possible to know argument name in extended c function? if yes,
than how i can do it???
More information about the Python-list
mailing list