And by the way, I would advice asking these kinds of questions in #python-dev IRC channel (Freenode). I believe you can get much better help about your problems regarding C-api there.<br><br><div class="gmail_quote">2011/12/25 Mrinalini Kulkarni <span dir="ltr"><<a href="mailto:mrinalini@edss.co.in">mrinalini@edss.co.in</a>></span><br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hello,<br>
<br>
I have embedded python into a vc++ app. I need to obtain type of the variable defined in the python script, in my c++ code.<br>
<br>
PyObject *pMyObject; -> assume points to a variable defined in the python script<br>
<br>
Now I want to do something like this<br>
<br>
const char * typeName;<br>
<br>
typeName = pMyObject->ob_type->tp_name<br>
<br>
Is this possible ? I tried doing this but it crashes.<br>
<br>
What is the alternative way for getting the name of the type from python. Is there a function available for this purpose such that I can obtain the address of that function using GetProcAddress and then use it for determining the type. (I am required to link to python dynamically)<br>

<br>
thanks,<br>
MK<span class="HOEnZb"><font color="#888888"><br>
-- <br>
<a href="http://mail.python.org/mailman/listinfo/python-list" target="_blank">http://mail.python.org/mailman/listinfo/python-list</a><br>
</font></span></blockquote></div><br><br clear="all"><br>-- <br><a href="http://yasar.serveblog.net/" target="_blank">http://yasar.serveblog.net/</a><br><br>