Opinions on Pyrex vs. ctypes vs. SWIG and whatever else binds to dynamic/shared libs

classic Classic list List threaded Threaded
11 messages Options
Reply | Threaded
Open this post in threaded view
|

Opinions on Pyrex vs. ctypes vs. SWIG and whatever else binds to dynamic/shared libs

Nathan Ramella
Hi guys,

Long time lurker, first time poster -- I've got a question that has  
been bugging me for a while and I figured I'd roll it out here to see  
what opinions people may have.

I've done a bit of work with Python binding to DLLs on Windows and  
shared libraries on Linux/OSX, but I've mostly taken the ctypes route  
using GCC-XML to generate wrapper code for me. It would seem that most  
cheese shop modules use Pyrex with hand coded wrappers or SWIG to half  
auto-gen the wrappers and finish off with hand fix-ups.

Since ctypes ships with Python I kind of assumed it would be the  
'default' way of performing this task, but most people seem to like  
Pyrex and a minority of people seem to use SWIG but hate it.

I suspect the question is similar to asking 'Which is better, vi or  
emacs?', but I'd like to hear what other people are doing / have done  
and why they prefer it?

For those unfamiliar with ctypes / ctypeslib here's the process:

0) Install gccxml
1) Install ctypeslib module if it's not on your system, this will put  
h2xml.py and xml2py.py on your system
2) h2xml.py -I/path/to/includes SomeIncludeFile.h -o SomeIncludeFile.xml
3) xml2py.py SomeIncludeFile.xml -o NewPythonModule.py

There's a bit of fiddling you can do with the h2xml stuff as far as  
preprocessing, but that's roughly what it takes. You still need to  
hand-fix the generated wrapper code to make it 'pythonic' if thats  
your flavor, since it passes C-type variables in and out, but it still  
seems like a better development flow than using Pyrex/SWIG, but there  
may be factors I'm unaware of. (Which is why I'm asking here!)

Hopefully this isn't too off topic for the list, I look forward to the  
responses,

Thanks!

Nathan Ramella
nar <> @ <> hush.com






_______________________________________________
Baypiggies mailing list
[hidden email]
To change your subscription options or unsubscribe:
http://mail.python.org/mailman/listinfo/baypiggies
Reply | Threaded
Open this post in threaded view
|

Re: Opinions on Pyrex vs. ctypes vs. SWIG and whatever else binds to dynamic/shared libs

Charles Merriam
I'd love some better information as well.  My small experience appears:

- Swig tends to be used for the fully automated conversions.  Swig can
keep the APIs up to date when Python is provided as yet another API in
a dynamic, large project.
- Almost all of the systems tend to create a distinctly verbose
interface.   For example, there's usally a "Menu.create(),
Menu.addItem(), Menu.removeItem()" gui interface instead of just
making a Menu an array of MenuItems and intercepting the updates.

Have a great day!

Charles Merriam

On Mon, Dec 29, 2008 at 12:23 PM, nar <[hidden email]> wrote:

> Hi guys,
>
> Long time lurker, first time poster -- I've got a question that has been
> bugging me for a while and I figured I'd roll it out here to see what
> opinions people may have.
>
> I've done a bit of work with Python binding to DLLs on Windows and shared
> libraries on Linux/OSX, but I've mostly taken the ctypes route using GCC-XML
> to generate wrapper code for me. It would seem that most cheese shop modules
> use Pyrex with hand coded wrappers or SWIG to half auto-gen the wrappers and
> finish off with hand fix-ups.
>
> Since ctypes ships with Python I kind of assumed it would be the 'default'
> way of performing this task, but most people seem to like Pyrex and a
> minority of people seem to use SWIG but hate it.
>
> I suspect the question is similar to asking 'Which is better, vi or emacs?',
> but I'd like to hear what other people are doing / have done and why they
> prefer it?
>
> For those unfamiliar with ctypes / ctypeslib here's the process:
>
> 0) Install gccxml
> 1) Install ctypeslib module if it's not on your system, this will put
> h2xml.py and xml2py.py on your system
> 2) h2xml.py -I/path/to/includes SomeIncludeFile.h -o SomeIncludeFile.xml
> 3) xml2py.py SomeIncludeFile.xml -o NewPythonModule.py
>
> There's a bit of fiddling you can do with the h2xml stuff as far as
> preprocessing, but that's roughly what it takes. You still need to hand-fix
> the generated wrapper code to make it 'pythonic' if thats your flavor, since
> it passes C-type variables in and out, but it still seems like a better
> development flow than using Pyrex/SWIG, but there may be factors I'm unaware
> of. (Which is why I'm asking here!)
>
> Hopefully this isn't too off topic for the list, I look forward to the
> responses,
>
> Thanks!
>
> Nathan Ramella
> nar <> @ <> hush.com
>
>
>
>
>
>
> _______________________________________________
> Baypiggies mailing list
> [hidden email]
> To change your subscription options or unsubscribe:
> http://mail.python.org/mailman/listinfo/baypiggies
>
_______________________________________________
Baypiggies mailing list
[hidden email]
To change your subscription options or unsubscribe:
http://mail.python.org/mailman/listinfo/baypiggies
Reply | Threaded
Open this post in threaded view
|

Re: Opinions on Pyrex vs. ctypes vs. SWIG and whatever else binds to dynamic/shared libs

Stephen McInerney
In reply to this post by Nathan Ramella

The "which wrapper to use?" design question was in fact one of the topics
of Damian Eads' paper at this year's SciPy 2008:
"First Time Experiences Using SciPy for Computer Vision Research"
http://conference.scipy.org/static/wiki/eads-cv.pdf

Not saying the paper was the definitive word on this subject, but
I thought it was a good paper and an interesting and topical application
area (satellite image analysis for nuclear non-proliferation) and a
SciPy newbie case study.

I suggested we should invite Damian to present at BayPIGgies sometime,
any comments?

In fact, many folks have experience on this question, it would make a great
topic for a presentation by multiple users sharing their viewpoints for different
domains (I haven't done this stuff so I can't comment myself;
The consensus answer as far as I can see seems to depend largely
on how robust and stable the wrapperized code is, how much type-safety
you need, exception-handling, how much control or visibility you have over
the underlying source etc...)

Stephen

> From: [hidden email]
> To: [hidden email]
> Date: Mon, 29 Dec 2008 12:23:43 -0800
> Subject: [Baypiggies] Opinions on Pyrex vs. ctypes vs. SWIG and whatever else binds to dynamic/shared libs
>
> Hi guys,
>
> Long time lurker, first time poster -- I've got a question that has
> been bugging me for a while and I figured I'd roll it out here to see
> what opinions people may have.
>
> I've done a bit of work with Python binding to DLLs on Windows and
> shared libraries on Linux/OSX, but I've mostly taken the ctypes route
> using GCC-XML to generate wrapper code for me. It would seem that most
> cheese shop modules use Pyrex with hand coded wrappers or SWIG to half
> auto-gen the wrappers and finish off with hand fix-ups.
>
> Since ctypes ships with Python I kind of assumed it would be the
> 'default' way of performing this task, but most people seem to like
> Pyrex and a minority of people seem to use SWIG but hate it.
>
> I suspect the question is similar to asking 'Which is better, vi or
> emacs?', but I'd like to hear what other people are doing / have done
> and why they prefer it?
>
> For those unfamiliar with ctypes / ctypeslib here's the process:
>
> 0) Install gccxml
> 1) Install ctypeslib module if it's not on your system, this will put
> h2xml.py and xml2py.py on your system
> 2) h2xml.py -I/path/to/includes SomeIncludeFile.h -o SomeIncludeFile.xml
> 3) xml2py.py SomeIncludeFile.xml -o NewPythonModule.py
>
> There's a bit of fiddling you can do with the h2xml stuff as far as
> preprocessing, but that's roughly what it takes. You still need to
> hand-fix the generated wrapper code to make it 'pythonic' if thats
> your flavor, since it passes C-type variables in and out, but it still
> seems like a better development flow than using Pyrex/SWIG, but there
> may be factors I'm unaware of. (Which is why I'm asking here!)
>
> Hopefully this isn't too off topic for the list, I look forward to the
> responses,
>
> Thanks!
>
> Nathan Ramella
> nar <> @ <> hush.com



It’s the same Hotmail®. If by “same” you mean up to 70% faster. Get your account now.
_______________________________________________
Baypiggies mailing list
[hidden email]
To change your subscription options or unsubscribe:
http://mail.python.org/mailman/listinfo/baypiggies
Reply | Threaded
Open this post in threaded view
|

Re: Opinions on Pyrex vs. ctypes vs. SWIG and whatever else binds to dynamic/shared libs

Shannon -jj Behrens
> Not saying the paper was the definitive word on this subject, but
> I thought it was a good paper and an interesting and topical application
> area (satellite image analysis for nuclear non-proliferation) and a
> SciPy newbie case study.
>
> I suggested we should invite Damian to present at BayPIGgies sometime,
> any comments?

+1 on a talk about:

 1. Using SciPy for computer vision research
 2. Image analysis for nuclear non-proliferation
 3. Which wrapper is best

-jj

--
In this life we cannot do great things. We can only do small things
with great love. -- Mother Teresa
http://jjinux.blogspot.com/
_______________________________________________
Baypiggies mailing list
[hidden email]
To change your subscription options or unsubscribe:
http://mail.python.org/mailman/listinfo/baypiggies
Reply | Threaded
Open this post in threaded view
|

Re: Opinions on Pyrex vs. ctypes vs. SWIG and whatever else binds to dynamic/shared libs

Andy Wiggin
In reply to this post by Nathan Ramella
It's been a long time since I did this myself, but another wrapper
generator to consider, and the one I used, is SIP (
http://www.riverbankcomputing.com/software/sip/intro ). As I remember
you basically provide it with a simplified C/C++ header file, and it
takes care of the rest. It worked very well for me, where I was
creating bindings for a few dozen fairly simple C++ classes in order
to do cross-platform GUI programming in Python.

-Andy

On Mon, Dec 29, 2008 at 12:23 PM, nar <[hidden email]> wrote:

> Hi guys,
>
> Long time lurker, first time poster -- I've got a question that has been
> bugging me for a while and I figured I'd roll it out here to see what
> opinions people may have.
>
> I've done a bit of work with Python binding to DLLs on Windows and shared
> libraries on Linux/OSX, but I've mostly taken the ctypes route using GCC-XML
> to generate wrapper code for me. It would seem that most cheese shop modules
> use Pyrex with hand coded wrappers or SWIG to half auto-gen the wrappers and
> finish off with hand fix-ups.
>
> Since ctypes ships with Python I kind of assumed it would be the 'default'
> way of performing this task, but most people seem to like Pyrex and a
> minority of people seem to use SWIG but hate it.
>
> I suspect the question is similar to asking 'Which is better, vi or emacs?',
> but I'd like to hear what other people are doing / have done and why they
> prefer it?
>
> For those unfamiliar with ctypes / ctypeslib here's the process:
>
> 0) Install gccxml
> 1) Install ctypeslib module if it's not on your system, this will put
> h2xml.py and xml2py.py on your system
> 2) h2xml.py -I/path/to/includes SomeIncludeFile.h -o SomeIncludeFile.xml
> 3) xml2py.py SomeIncludeFile.xml -o NewPythonModule.py
>
> There's a bit of fiddling you can do with the h2xml stuff as far as
> preprocessing, but that's roughly what it takes. You still need to hand-fix
> the generated wrapper code to make it 'pythonic' if thats your flavor, since
> it passes C-type variables in and out, but it still seems like a better
> development flow than using Pyrex/SWIG, but there may be factors I'm unaware
> of. (Which is why I'm asking here!)
>
> Hopefully this isn't too off topic for the list, I look forward to the
> responses,
>
> Thanks!
>
> Nathan Ramella
> nar <> @ <> hush.com
>
>
>
>
>
>
> _______________________________________________
> Baypiggies mailing list
> [hidden email]
> To change your subscription options or unsubscribe:
> http://mail.python.org/mailman/listinfo/baypiggies
>
_______________________________________________
Baypiggies mailing list
[hidden email]
To change your subscription options or unsubscribe:
http://mail.python.org/mailman/listinfo/baypiggies
Reply | Threaded
Open this post in threaded view
|

Re: Opinions on Pyrex vs. ctypes vs. SWIG and whatever else binds to dynamic/shared libs

Benjamin Sergeant
Yep, SIP is used to create the python binding around the big (lots of code) Qt library. I think there is also a solution from Boost.

On Tue, Dec 30, 2008 at 10:32 AM, Andy Wiggin <[hidden email]> wrote:
It's been a long time since I did this myself, but another wrapper
generator to consider, and the one I used, is SIP (
http://www.riverbankcomputing.com/software/sip/intro ). As I remember
you basically provide it with a simplified C/C++ header file, and it
takes care of the rest. It worked very well for me, where I was
creating bindings for a few dozen fairly simple C++ classes in order
to do cross-platform GUI programming in Python.

-Andy

On Mon, Dec 29, 2008 at 12:23 PM, nar <[hidden email]> wrote:
> Hi guys,
>
> Long time lurker, first time poster -- I've got a question that has been
> bugging me for a while and I figured I'd roll it out here to see what
> opinions people may have.
>
> I've done a bit of work with Python binding to DLLs on Windows and shared
> libraries on Linux/OSX, but I've mostly taken the ctypes route using GCC-XML
> to generate wrapper code for me. It would seem that most cheese shop modules
> use Pyrex with hand coded wrappers or SWIG to half auto-gen the wrappers and
> finish off with hand fix-ups.
>
> Since ctypes ships with Python I kind of assumed it would be the 'default'
> way of performing this task, but most people seem to like Pyrex and a
> minority of people seem to use SWIG but hate it.
>
> I suspect the question is similar to asking 'Which is better, vi or emacs?',
> but I'd like to hear what other people are doing / have done and why they
> prefer it?
>
> For those unfamiliar with ctypes / ctypeslib here's the process:
>
> 0) Install gccxml
> 1) Install ctypeslib module if it's not on your system, this will put
> h2xml.py and xml2py.py on your system
> 2) h2xml.py -I/path/to/includes SomeIncludeFile.h -o SomeIncludeFile.xml
> 3) xml2py.py SomeIncludeFile.xml -o NewPythonModule.py
>
> There's a bit of fiddling you can do with the h2xml stuff as far as
> preprocessing, but that's roughly what it takes. You still need to hand-fix
> the generated wrapper code to make it 'pythonic' if thats your flavor, since
> it passes C-type variables in and out, but it still seems like a better
> development flow than using Pyrex/SWIG, but there may be factors I'm unaware
> of. (Which is why I'm asking here!)
>
> Hopefully this isn't too off topic for the list, I look forward to the
> responses,
>
> Thanks!
>
> Nathan Ramella
> nar <> @ <> hush.com
>
>
>
>
>
>
> _______________________________________________
> Baypiggies mailing list
> [hidden email]
> To change your subscription options or unsubscribe:
> http://mail.python.org/mailman/listinfo/baypiggies
>
_______________________________________________
Baypiggies mailing list
[hidden email]
To change your subscription options or unsubscribe:
http://mail.python.org/mailman/listinfo/baypiggies


_______________________________________________
Baypiggies mailing list
[hidden email]
To change your subscription options or unsubscribe:
http://mail.python.org/mailman/listinfo/baypiggies
Reply | Threaded
Open this post in threaded view
|

Speaker for Feb/Mar/Apr [Pyrex/ctypes/SWIG for wrapping satellite image analysis for nuclear non-proliferation]

Stephen McInerney
In reply to this post by Stephen McInerney
I spoke with Damian Eads and he offers to give us an expanded version
of his SciPy 08 talk for Pyrex/ctypes/SWIG for satellite image analysis for
nuclear non-proliferation [link below]
Not sure if Nathan or anyone else wanted to do a newbie nugget on this
same topic that nght - could be good, I would encourage Nathan to.
 
Jim or someone - can you mail out the list of our scheduled meeting dates for
Feb-Mar-Apr at the new Symantec Mtn View location?
 
Damian is based in New Mexico so let's see what fits his schedule.

Regards,
Stephen



From: [hidden email]
To: [hidden email]
Date: Mon, 29 Dec 2008 20:20:01 -0800
CC: [hidden email]
Subject: Re: [Baypiggies] Opinions on Pyrex vs. ctypes vs. SWIG and whatever else binds to dynamic/shared libs


The "which wrapper to use?" design question was in fact one of the topics
of Damian Eads' paper at this year's SciPy 2008:
"First Time Experiences Using SciPy for Computer Vision Research"
http://conference.scipy.org/static/wiki/eads-cv.pdf

Not saying the paper was the definitive word on this subject, but
I thought it was a good paper and an interesting and topical application
area (satellite image analysis for nuclear non-proliferation) and a
SciPy newbie case study.

I suggested we should invite Damian to present at BayPIGgies sometime,
any comments?

In fact, many folks have experience on this question, it would make a great
topic for a presentation by multiple users sharing their viewpoints for different
domains (I haven't done this stuff so I can't comment myself;
The consensus answer as far as I can see seems to depend largely
on how robust and stable the wrapperized code is, how much type-safety
you need, exception-handling, how much control or visibility you have over
the underlying source etc...)

Stephen

> From: [hidden email]
> To: [hidden email]
> Date: Mon, 29 Dec 2008 12:23:43 -0800
> Subject: [Baypiggies] Opinions on Pyrex vs. ctypes vs. SWIG and whatever else binds to dynamic/shared libs
>
> Hi guys,
>
> Long time lurker, first time poster -- I've got a question that has
> been bugging me for a while and I figured I'd roll it out here to see
> what opinions people may have.
>
> I've done a bit of work with Python binding to DLLs on Windows and
> shared libraries on Linux/OSX, but I've mostly taken the ctypes route
> using GCC-XML to generate wrapper code for me. It would seem that most
> cheese shop modules use Pyrex with hand coded wrappers or SWIG to half
> auto-gen the wrappers and finish off with hand fix-ups.
>
> Since ctypes ships with Python I kind of assumed it would be the
> 'default' way of performing this task, but most people seem to like
> Pyrex and a minority of people seem to use SWIG but hate it.
>
> I suspect the question is similar to asking 'Which is better, vi or
> emacs?', but I'd like to hear what other people are doing / have done
> and why they prefer it?
>
> For those unfamiliar with ctypes / ctypeslib here's the process:
>
> 0) Install gccxml
> 1) Install ctypeslib module if it's not on your system, this will put
> h2xml.py and xml2py.py on your system
> 2) h2xml.py -I/path/to/includes SomeIncludeFile.h -o SomeIncludeFile.xml
> 3) xml2py.py SomeIncludeFile.xml -o NewPythonModule.py
>
> There's a bit of fiddling you can do with the h2xml stuff as far as
> preprocessing, but that's roughly what it takes. You still need to
> hand-fix the generated wrapper code to make it 'pythonic' if thats
> your flavor, since it passes C-type variables in and out, but it still
> seems like a better development flow than using Pyrex/SWIG, but there
> may be factors I'm unaware of. (Which is why I'm asking here!)
>
> Hopefully this isn't too off topic for the list, I look forward to the
> responses,
>
> Thanks!
>
> Nathan Ramella
> nar <> @ <> hush.com





It’s the same Hotmail®. If by “same” you mean up to 70% faster. Get your account now.


Windows Live™: Keep your life in sync. Check it out.
_______________________________________________
Baypiggies mailing list
[hidden email]
To change your subscription options or unsubscribe:
http://mail.python.org/mailman/listinfo/baypiggies
Reply | Threaded
Open this post in threaded view
|

Re: Speaker for Feb/Mar/Apr [Pyrex/ctypes/SWIG for wrapping satellite image analysis for nuclear non-proliferation]

Tony Cappellini
>  Jim or someone - can you mail out the list of our scheduled meeting dates
> for
>  Feb-Mar-Apr at the new Symantec Mtn View location?

Symantec has us scheduled for the 4th Thursday of the month for most
of this year.

February 26, March 26, April 23.
_______________________________________________
Baypiggies mailing list
[hidden email]
To change your subscription options or unsubscribe:
http://mail.python.org/mailman/listinfo/baypiggies
Reply | Threaded
Open this post in threaded view
|

Re: Speaker for Feb/Mar/Apr [Pyrex/ctypes/SWIG for wrapping satellite image analysis for nuclear non-proliferation]

Stephen McInerney
 
Okay, I suspected we moved to 4th Thursday but was not sure. In which case the webpage needs updating from:
 

Meeting Schedule

BayPIGgies meetings are held on the 2nd Thursday of every month. Meetings are from 7:30 PM - 9 PM at
If you are planning on attending this meeting: Click to Sign up

Meeting Location

The Tech Museum of Innovation
201 South Market Street
San Jose, CA 95113


> Date: Sat, 17 Jan 2009 21:24:43 -0800
> Subject: Re: [Baypiggies] Speaker for Feb/Mar/Apr [Pyrex/ctypes/SWIG for wrapping satellite image analysis for nuclear non-proliferation]
> From: [hidden email]
> To: [hidden email]
> CC: [hidden email]; [hidden email]
>
> > Jim or someone - can you mail out the list of our scheduled meeting dates
> > for
> > Feb-Mar-Apr at the new Symantec Mtn View location?
>
> Symantec has us scheduled for the 4th Thursday of the month for most
> of this year.
>
> February 26, March 26, April 23.



Windows Live™: Keep your life in sync. Check it out.
_______________________________________________
Baypiggies mailing list
[hidden email]
To change your subscription options or unsubscribe:
http://mail.python.org/mailman/listinfo/baypiggies
Reply | Threaded
Open this post in threaded view
|

FW: Speaker for Feb/Mar/Apr [Pyrex/ctypes/SWIG for wrapping image analysis ]

Stephen McInerney
In reply to this post by Stephen McInerney
Please all change the title to just:
 "Pyrex/ctypes/SWIG for wrapping image analysis"
 
It is best to let Damian subscribe to the list and give you the blurb directly.
 
Rgds,
Stephen

> Date: Sat, 17 Jan 2009 21:59:43 -0800
> Subject: Re: Speaker for Feb/Mar/Apr [Pyrex/ctypes/SWIG for wrapping satellite image analysis for nuclear non-proliferation]
> From: [hidden email]
> To: [hidden email]
>
> Stephen, please strike the satellite imagery and nuclear
> nonproliferation parts. 

> Thanks,
>
> Damian
>
> On Sat, Jan 17, 2009 at 9:19 PM, Stephen McInerney
> <[hidden email]> wrote:
> > I spoke with Damian Eads and he offers to give us an expanded version
> > of his SciPy 08 talk for Pyrex/ctypes/SWIG for satellite image analysis for
> > nuclear non-proliferation [link below]
> > Not sure if Nathan or anyone else wanted to do a newbie nugget on this
> > same topic that nght - could be good, I would encourage Nathan to.
> >
> > Jim or someone - can you mail out the list of our scheduled meeting dates
> > for
> > Feb-Mar-Apr at the new Symantec Mtn View location?
> >
> > Damian is based in New Mexico so let's see what fits his schedule.
> >
> > Regards,
> > Stephen
> >
> > ________________________________
> > From: [hidden email]
> > To: [hidden email]
> > Date: Mon, 29 Dec 2008 20:20:01 -0800
> > CC: [hidden email]
> > Subject: Re: [Baypiggies] Opinions on Pyrex vs. ctypes vs. SWIG and whatever
> > else binds to dynamic/shared libs
> >
> >
> > The "which wrapper to use?" design question was in fact one of the topics
> > of Damian Eads' paper at this year's SciPy 2008:
> > "First Time Experiences Using SciPy for Computer Vision Research"
> > http://conference.scipy.org/static/wiki/eads-cv.pdf
> >
> > Not saying the paper was the definitive word on this subject, but
> > I thought it was a good paper and an interesting and topical application
> > area (satellite image analysis for nuclear non-proliferation) and a
> > SciPy newbie case study.
> >
> > I suggested we should invite Damian to present at BayPIGgies sometime,
> > any comments?
> >
> > In fact, many folks have experience on this question, it would make a great
> > topic for a presentation by multiple users sharing their viewpoints for
> > different
> > domains (I haven't done this stuff so I can't comment myself;
> > The consensus answer as far as I can see seems to depend largely
> > on how robust and stable the wrapperized code is, how much type-safety
> > you need, exception-handling, how much control or visibility you have over
> > the underlying source etc...)
> >
> > Stephen
> >
> >> From: [hidden email]
> >> To: [hidden email]
> >> Date: Mon, 29 Dec 2008 12:23:43 -0800
> >> Subject: [Baypiggies] Opinions on Pyrex vs. ctypes vs. SWIG and whatever
> >> else binds to dynamic/shared libs
> >>
> >> Hi guys,
> >>
> >> Long time lurker, first time poster -- I've got a question that has
> >> been bugging me for a while and I figured I'd roll it out here to see
> >> what opinions people may have.
> >>
> >> I've done a bit of work with Python binding to DLLs on Windows and
> >> shared libraries on Linux/OSX, but I've mostly taken the ctypes route
> >> using GCC-XML to generate wrapper code for me. It would seem that most
> >> cheese shop modules use Pyrex with hand coded wrappers or SWIG to half
> >> auto-gen the wrappers and finish off with hand fix-ups.
> >>
> >> Since ctypes ships with Python I kind of assumed it would be the
> >> 'default' way of performing this task, but most people seem to like
> >> Pyrex and a minority of people seem to use SWIG but hate it.
> >>
> >> I suspect the question is similar to asking 'Which is better, vi or
> >> emacs?', but I'd like to hear what other people are doing / have done
> >> and why they prefer it?
> >>
> >> For those unfamiliar with ctypes / ctypeslib here's the process:
> >>
> >> 0) Install gccxml
> >> 1) Install ctypeslib module if it's not on your system, this will put
> >> h2xml.py and xml2py.py on your system
> >> 2) h2xml.py -I/path/to/includes SomeIncludeFile.h -o SomeIncludeFile.xml
> >> 3) xml2py.py SomeIncludeFile.xml -o NewPythonModule.py
> >>
> >> There's a bit of fiddling you can do with the h2xml stuff as far as
> >> preprocessing, but that's roughly what it takes. You still need to
> >> hand-fix the generated wrapper code to make it 'pythonic' if thats
> >> your flavor, since it passes C-type variables in and out, but it still
> >> seems like a better development flow than using Pyrex/SWIG, but there
> >> may be factors I'm unaware of. (Which is why I'm asking here!)
> >>
> >> Hopefully this isn't too off topic for the list, I look forward to the
> >> responses,
> >>
> >> Thanks!
> >>
> >> Nathan Ramella
> >> nar <> @ <> hush.com
> >
> >
> >
> > ________________________________
> > It's the same Hotmail(R). If by "same" you mean up to 70% faster. Get your
> > account now.
> >
> > ________________________________
> > Windows Live™: Keep your life in sync. Check it out.



Windows Live™ Hotmail®: Chat. Store. Share. Do more with mail. See how it works.
_______________________________________________
Baypiggies mailing list
[hidden email]
To change your subscription options or unsubscribe:
http://mail.python.org/mailman/listinfo/baypiggies
Reply | Threaded
Open this post in threaded view
|

Re: Speaker for Feb/Mar/Apr [Pyrex/ctypes/SWIG for wrapping satellite image analysis for nuclear non-proliferation]

William Deegan-2
In reply to this post by Stephen McInerney
All,

Web site's been updated.
Can someone construct a summary of the next meeting and I'll post it.

Also please double check the location information, and if anyone has info on parking and/or public transit let me know and I'll update the site with that as well.

-Bill

On Sat, Jan 17, 2009 at 9:26 PM, Stephen McInerney <[hidden email]> wrote:
 
Okay, I suspected we moved to 4th Thursday but was not sure. In which case the webpage needs updating from:
 

Meeting Schedule

BayPIGgies meetings are held on the 2nd Thursday of every month. Meetings are from 7:30 PM - 9 PM at
If you are planning on attending this meeting: Click to Sign up

Meeting Location

The Tech Museum of Innovation
201 South Market Street
San Jose, CA 95113


> Date: Sat, 17 Jan 2009 21:24:43 -0800
> Subject: Re: [Baypiggies] Speaker for Feb/Mar/Apr [Pyrex/ctypes/SWIG for wrapping satellite image analysis for nuclear non-proliferation]
> From: [hidden email]
> To: [hidden email]
> CC: [hidden email]; [hidden email]

>
> > Jim or someone - can you mail out the list of our scheduled meeting dates
> > for
> > Feb-Mar-Apr at the new Symantec Mtn View location?
>
> Symantec has us scheduled for the 4th Thursday of the month for most
> of this year.
>
> February 26, March 26, April 23.



Windows Live™: Keep your life in sync. Check it out.

_______________________________________________
Baypiggies mailing list
[hidden email]
To change your subscription options or unsubscribe:
http://mail.python.org/mailman/listinfo/baypiggies


_______________________________________________
Baypiggies mailing list
[hidden email]
To change your subscription options or unsubscribe:
http://mail.python.org/mailman/listinfo/baypiggies