Obtaining the PyObject * of a class
gregory.bronner at lehman.com
Tue Mar 11 21:51:58 CET 2008
I'd strongly disagree.
SWIG is very useful for wrapping large scale projects in a
non-interfering manner. If you have to generate bindings for 1000+
classes, it is by far the easiest way to do things.
It isn't clear what you are doing that requires the PyObject*, or which
one you'd like.
In general, the output one is found in $result, and $input is input
PyObject for that typemap.
From: Michael Wieher [mailto:michael.wieher at gmail.com]
Sent: Tuesday, March 11, 2008 3:09 PM
To: python-list at python.org
Subject: Re: Obtaining the PyObject * of a class
1st. there is a python mailing list for people interested in C++
extension type stuff
2nd. SWIG is useless and overly complicated, its much easier to just
generate your own C++ code by hand, less confusion, and much more
clarity. I find no value in using anything else.
People complain about the "boilerplate" code, but honestly, copy &
paste, change three characters, and you're done. And you know exactly
what is happening, how when and why.
2008/3/11, Chris Mellon <arkanes at gmail.com>:
On Tue, Mar 11, 2008 at 12:13 PM, Terry Reedy <tjreedy at udel.edu>
> "Cooper, Andrew" <ACooper at cimtek.com> wrote in message
news:C03234BF0E2A8C419C4C307D0914EB730251D3A9 at MAILSERVER.cimtek.on.ca...
> | Are there any Python C API experts/SWIG experts out there
that can help
> | me with this issue please.
> | I',m currently using SWIG to generate a python interface to
a C DLL.
> Some people have switched to using ctypes for this, and many
> users have stopped reading clp. But I hope someone answers
Using Pyrex or Cython is likely to be much easier than using
SWIG for this.
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
This message is intended only for the personal and confidential use of the designated recipient(s) named above. If you are not the intended recipient of this message you are hereby notified that any review, dissemination, distribution or copying of this message is strictly prohibited. This communication is for information purposes only and should not be regarded as an offer to sell or as a solicitation of an offer to buy any financial product, an official confirmation of any transaction, or as an official statement of Lehman Brothers. Email transmission cannot be guaranteed to be secure or error-free. Therefore, we do not represent that this information is complete or accurate and it should not be relied upon as such. All information is subject to change without notice.
IRS Circular 230 Disclosure:
Please be advised that any discussion of U.S. tax matters contained within this communication (including any attachments) is not intended or written to be used and cannot be used for the purpose of (i) avoiding U.S. tax related penalties or (ii) promoting, marketing or recommending to another party any transaction or matter addressed herein.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Python-list