Re: C++ version of the C Python API?

2007-10-23 Thread Martin Marcher
2007/10/21, Robert Dailey [EMAIL PROTECTED]: On 10/21/07, Martin v. Löwis [EMAIL PROTECTED] wrote: No, I literally meant that the Python C API is object-oriented. You don't need an object-oriented language to write object-oriented code. I disagree with this statement. C is not an object

Re: C++ version of the C Python API?

2007-10-22 Thread Robert Dailey
On 10/22/07, Nicholas Bastin [EMAIL PROTECTED] wrote: Object-oriented programming is a design choice, not a language feature. You can write straight procedural code in C++, and you can write object oriented code in C. Sure, C++ has some language features which facilitate object-oriented

Re: C++ version of the C Python API?

2007-10-22 Thread Martin v. Löwis
This preference, in turn, is what motivated my original question. The CPython API interface itself seems modularized, NOT object oriented (only from what I saw). I suggest you look again, then. Things like PyObject_String, PyObject_GetAttrString, or PySequence_GetItem all express the

Re: C++ version of the C Python API?

2007-10-21 Thread Martin v. Löwis
Is there a C++ version of the C Python API packaged with python 2.5? Stargaming has already mentioned the fine points; the first answer is: yes, the API packaged python 2.5 can be used with C++. It is a C++ version of the same API as it adds proper extern C declarations around all prototypes

Re: C++ version of the C Python API?

2007-10-21 Thread Robert Dailey
On 10/21/07, Martin v. Löwis [EMAIL PROTECTED] wrote: Is there a C++ version of the C Python API packaged with python 2.5? Stargaming has already mentioned the fine points; the first answer is: yes, the API packaged python 2.5 can be used with C++. It is a C++ version of the same API

Re: C++ version of the C Python API?

2007-10-21 Thread Martin v. Löwis
Well C++ implicitly includes OOP since that is the foundation of the language. I was more or less asking if there was an object oriented version of the Python embedded API or perhaps an OO wrapper. However it doesn't seem that way, so I may have to make my own. I think you are misinterpreting

Re: C++ version of the C Python API?

2007-10-21 Thread Robert Dailey
On 10/21/07, Martin v. Löwis [EMAIL PROTECTED] wrote: I think you are misinterpreting what you are seeing. The Python C API *is* object-oriented. It has all features of object-orientation: classes, encapsulation, polymorphism, late binding, ... As for make your own: people have tried this

Re: C++ version of the C Python API?

2007-10-21 Thread Martin v. Löwis
Could you emphasize a little more? I haven't worked much at all with the Python C API, so I may be misunderstanding. First of all, you say that the Python C API is object oriented, which is contradictory because it should read Python C++ API is object oriented. Perhaps this is a typo, or

Re: C++ version of the C Python API?

2007-10-21 Thread Robert Dailey
On 10/21/07, Martin v. Löwis [EMAIL PROTECTED] wrote: No, I literally meant that the Python C API is object-oriented. You don't need an object-oriented language to write object-oriented code. I disagree with this statement. C is not an object oriented language, and I've seen attempts to make

Re: C++ version of the C Python API?

2007-10-21 Thread Alex Martelli
Martin v. Löwis [EMAIL PROTECTED] wrote: ... The most popular ones are Boost.Python, CXX, and PySTL. I think SIP is also pretty popular (see http://www.riverbankcomputing.co.uk/sip/). Alex -- http://mail.python.org/mailman/listinfo/python-list

Re: C++ version of the C Python API?

2007-10-21 Thread Carl Banks
On Sun, 21 Oct 2007 16:17:19 -0500, Robert Dailey wrote: On 10/21/07, Martin v. Löwis [EMAIL PROTECTED] wrote: No, I literally meant that the Python C API is object-oriented. You don't need an object-oriented language to write object-oriented code. I disagree with this statement. C is not an

Re: C++ version of the C Python API?

2007-10-21 Thread Michael L Torrie
taking the time to respond to my inquiry and offer a few C++ wrapper API's for the Python C API. Take care! Any C++ version of the python API is by definition going to be a wrapper around the C version. Even the C version is a wrapper around the python object model. -- http://mail.python.org/mailman

Re: C++ version of the C Python API?

2007-10-21 Thread Aahz
In article [EMAIL PROTECTED], Robert Dailey [EMAIL PROTECTED] wrote: Is there a C++ version of the C Python API packaged with python 2.5? It would be nice to have a OOP approach to embedding python in C++. It would also be a bonus if this C++ Python API cleaned up a lot of the messy code involved

Re: C++ version of the C Python API?

2007-10-21 Thread Nicholas Bastin
On 10/21/07, Carl Banks [EMAIL PROTECTED] wrote: Now, a C++ API for CPython would necessarily be built on top of the C API, which carries some limitations relative to the OOP abilities of C++ itself. It wouldn't have to be, although it'd be much more of a maintenance nightmare if it poked into

Re: C++ version of the C Python API?

2007-10-21 Thread Nicholas Bastin
On 10/21/07, Robert Dailey [EMAIL PROTECTED] wrote: On 10/21/07, Martin v. Löwis [EMAIL PROTECTED] wrote: No, I literally meant that the Python C API is object-oriented. You don't need an object-oriented language to write object-oriented code. I disagree with this statement. C is not an

Re: C++ version of the C Python API?

2007-10-19 Thread Joe Riopel
On 10/19/07, Robert Dailey [EMAIL PROTECTED] wrote: Is there a C++ version of the C Python API packaged with python 2.5? It would be nice to have a OOP approach to embedding python in C++. It would also be a bonus if this C++ Python API cleaned up a lot of the messy code involved in embedding

C++ version of the C Python API?

2007-10-19 Thread Robert Dailey
Hi, Is there a C++ version of the C Python API packaged with python 2.5? It would be nice to have a OOP approach to embedding python in C++. It would also be a bonus if this C++ Python API cleaned up a lot of the messy code involved in embedding python. Thanks. -- http://mail.python.org/mailman

Re: C++ version of the C Python API?

2007-10-19 Thread Stargaming
On Fri, 19 Oct 2007 17:37:29 -0500, Robert Dailey wrote: Hi, Is there a C++ version of the C Python API packaged with python 2.5? It would be nice to have a OOP approach to embedding python in C++. It would also be a bonus if this C++ Python API cleaned up a lot of the messy code involved