Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #17881
| Path | csiph.com!x330-a1.tempe.blueboxinc.net!usenet.pasdenom.info!weretis.net!feeder1.news.weretis.net!feeder.erje.net!newsfeed.xs4all.nl!newsfeed6.news.xs4all.nl!xs4all!newsgate.cistron.nl!newsgate.news.xs4all.nl!post.news.xs4all.nl!not-for-mail |
|---|---|
| Return-Path | <mrinalini@edss.co.in> |
| X-Original-To | python-list@python.org |
| Delivered-To | python-list@mail.python.org |
| X-Spam-Status | OK 0.003 |
| X-Spam-Evidence | '*H*': 0.99; '*S*': 0.00; 'python.': 0.04; 'subject:using': 0.04; 'char': 0.07; 'script,': 0.07; 'subject:object': 0.07; 'python': 0.08; 'const': 0.09; 'c++': 0.12; 'pyobject': 0.16; 'typename': 0.16; 'thanks,': 0.18; 'subject:help': 0.21; 'assume': 0.22; 'defined': 0.24; 'code.': 0.26; 'function': 0.27; 'tried': 0.27; 'variable': 0.28; 'script': 0.28; 'header:User-Agent:1': 0.33; 'there': 0.33; 'points': 0.34; 'to:addr:python-list': 0.34; 'something': 0.35; 'but': 0.37; 'hello,': 0.37; 'doing': 0.38; 'using': 0.38; 'getting': 0.38; 'to:addr:python.org': 0.40; 'type': 0.61; 'address': 0.61; 'link': 0.63; 'alternative': 0.65; 'subjectcharset:utf-8': 0.73 |
| MIME-Version | 1.0 |
| Content-Type | text/plain; charset=UTF-8; format=flowed |
| Content-Transfer-Encoding | 7bit |
| Date | Sun, 25 Dec 2011 16:58:55 +0530 |
| From | Mrinalini Kulkarni <mrinalini@edss.co.in> |
| To | <python-list@python.org> |
| Subject | help - obtaining the type of the object using tp_name |
| Organization | EDSS Pvt.Ltd. |
| X-Sender | mrinalini@edss.co.in |
| User-Agent | Roundcube Webmail/0.5.1 |
| X-BeenThere | python-list@python.org |
| X-Mailman-Version | 2.1.12 |
| Precedence | list |
| List-Id | General discussion list for the Python programming language <python-list.python.org> |
| List-Unsubscribe | <http://mail.python.org/mailman/options/python-list>, <mailto:python-list-request@python.org?subject=unsubscribe> |
| List-Archive | <http://mail.python.org/pipermail/python-list> |
| List-Post | <mailto:python-list@python.org> |
| List-Help | <mailto:python-list-request@python.org?subject=help> |
| List-Subscribe | <http://mail.python.org/mailman/listinfo/python-list>, <mailto:python-list-request@python.org?subject=subscribe> |
| Newsgroups | comp.lang.python |
| Message-ID | <mailman.4062.1324814226.27778.python-list@python.org> (permalink) |
| Lines | 23 |
| NNTP-Posting-Host | 2001:888:2000:d::a6 |
| X-Trace | 1324814226 news.xs4all.nl 6870 [2001:888:2000:d::a6]:36155 |
| X-Complaints-To | abuse@xs4all.nl |
| Xref | x330-a1.tempe.blueboxinc.net comp.lang.python:17881 |
Show key headers only | View raw
Hello, 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. PyObject *pMyObject; -> assume points to a variable defined in the python script Now I want to do something like this const char * typeName; typeName = pMyObject->ob_type->tp_name Is this possible ? I tried doing this but it crashes. 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) thanks, MK
Back to comp.lang.python | Previous | Next | Find similar | Unroll thread
help - obtaining the type of the object using tp_name Mrinalini Kulkarni <mrinalini@edss.co.in> - 2011-12-25 16:58 +0530
csiph-web