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