Re: Python and C++

2006-07-25 Thread Roman Yakovenko
On 7/25/06, Dave Kuhlman <[EMAIL PROTECTED]> wrote: > KraftDiner wrote: > > > What ways can I call my C++ classes from within Python. > > I've looked at boost but it would appear that there is little > > support or knowledge on boost in the python community. > > If you want to write Python wrappers

Re: Python and C++

2006-07-25 Thread Dave Kuhlman
KraftDiner wrote: > What ways can I call my C++ classes from within Python. > I've looked at boost but it would appear that there is little > support or knowledge on boost in the python community. If you want to write Python wrappers for C++ code *by hand*, look here: http://docs.python.org/

Re: Python and C++

2006-07-25 Thread Roman Yakovenko
On 25 Jul 2006 10:51:36 -0700, KraftDiner <[EMAIL PROTECTED]> wrote: > What ways can I call my C++ classes from within Python. > I've looked at boost but it would appear that there is little > support or knowledge on boost in the python community. It is not true! I am sure that if you ask you ques

Re: Python and C

2006-03-11 Thread Thomas Heller
Terry Reedy wrote: > "P Boy" <[EMAIL PROTECTED]> wrote in message > news:[EMAIL PROTECTED] >>> Has anyone yet written a program to grab C struct declaration from the >>> .h >>> to produce code like >>> >>> # Overlay configuration >>> class OverlayStoreConfig(ctypes.Structure): >>> _fields_ =

Re: Python and C

2006-03-10 Thread Terry Reedy
"P Boy" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] >> Has anyone yet written a program to grab C struct declaration from the >> .h >> to produce code like >> >> # Overlay configuration >> class OverlayStoreConfig(ctypes.Structure): >> _fields_ = [('FormatVersion', ctypes.c

Re: Python and C

2006-03-10 Thread P Boy
> Has anyone yet written a program to grab C struct declaration from the .h > to produce code like > > # Overlay configuration > class OverlayStoreConfig(ctypes.Structure): > _fields_ = [('FormatVersion', ctypes.c_ulong), > ('VolumeSize', ctypes.c_longlong), >

Re: Python and C

2006-03-10 Thread Alex Martelli
David Boddie <[EMAIL PROTECTED]> wrote: > Alex Martelli wrote: > > <[EMAIL PROTECTED]> wrote: > > > C is the lowest, most fundamental level of extension, but there are many > > other alternatives -- SWIG to wrap existing libraries, Boost or SCXX or > > SIP to wrap specifically C++ with very diffe

Re: Python and C

2006-03-10 Thread Terry Reedy
"P Boy" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > I have recently found another approach by using ctypes (http://starship.python.net/crew/theller/ctypes/). Ctypes is now a 2.5 standard lib module and in being tested as such on multiple systems. > I have a library from Micro

Re: Python and C

2006-03-10 Thread P Boy
I have written some C extension before but it was pretty tedious. I have recently found another approach by using ctypes (http://starship.python.net/crew/theller/ctypes/). Which you develop your C module in dynamic library (DLL in Windows world), the from Python, you can call the C functions in the

Re: Python and C

2006-03-10 Thread P Boy
I have written some C extension before but it was pretty tedious. I have recently found another approach by using ctypes (http://starship.python.net/crew/theller/ctypes/). Which you develop your C module in dynamic library (DLL in Windows world), the from Python, you can call the C functions in the

Re: Python and C

2006-03-10 Thread David Boddie
Alex Martelli wrote: > <[EMAIL PROTECTED]> wrote: > C is the lowest, most fundamental level of extension, but there are many > other alternatives -- SWIG to wrap existing libraries, Boost or SCXX or > SIP to wrap specifically C++ with very different philosophies (template > heavy, minimal, Qt-base

Re: Python and C

2006-03-10 Thread Alex Martelli
<[EMAIL PROTECTED]> wrote: > I was a C Programmer for a while. Lately started to learn Python for > one small project at school. I joined a small company where they use > C++ for development. > > Can we use Python and C together ? I mean create some classes in Python > and some number crunching a

Re: Python and C

2006-03-10 Thread Diez B. Roggisch
> http://docs.python.org/api/api.html That should have been http://docs.python.org/ext/ext.html but you need the other one sooner or later. Diez -- http://mail.python.org/mailman/listinfo/python-list

Re: Python and C

2006-03-10 Thread Diez B. Roggisch
[EMAIL PROTECTED] wrote: > I was a C Programmer for a while. Lately started to learn Python for > one small project at school. I joined a small company where they use > C++ for development. > > Can we use Python and C together ? I mean create some classes in Python > and some number crunching alg