probs w/ building python extensions on free Microsoft.NET SDK

Shakeeb Alireza sa at bayt.net
Tue Aug 7 12:15:23 CEST 2001


"Greg Landrum" <gReGlAnDrUm at earthlink.net> wrote in message news:<9knqsc$drr$1 at slb5.atl.mindspring.net>...

> While I agree that the extending/embedding docs aren't necessarily as user
> friendly as they could be, I would contend that they aren't really directed
> at newbies.  Extending/embedding is an advanced topic.  This isn't to say
> that you shouldn't be doing it, but you definitely should expect it to be
> more challenging than using Python itself.

True. But I was surprised how easy it actually is once you figure out
that the distutils step. IMHO the elegance and ease of "python
setup.py build" for supported compilers makes this kosher territory
for newbies. I only wish it was emphasized more.

> You are making things a lot harder on yourself than they need to be.  You're
> using a beta of a fragment of a build environment and then trying to apply
> documentation which was written for people using the full environment.  If
> you don't want to pay for your compiler, look into the Borland product,
> which I know has been used to build python extensions.  I remember seeing at
> least one how-to for this as well.

Thanks for the tip on Borland. Would follow it if I didn't finally
manage to successfully compile using the .NET SDK.
 
> > Again, my main source of confusion was due to the documentation with
> > its intermezzos, dearth of clear examples, and its essential
> > assumption that the reader is already a proficient c coder and not a
> > newbie (graduating to c extensions).
> 
> It's assuming that you are a newbie to writing extensions.  It certainly
> isn't trying to teach you C.  Interlanguage stuff is always harder than
> writing in a single language.  Probably the best first C project is
> something other than writing an extension module.

Just bought the Kernighan and Ritchie "The C Programming Language"
with the express purpose of getting comfy with C syntax. But I'm still
intent (now that I've successfully compiled a minimal extension) on
building python objects in C... I mean what's the point if I can't use
them in my favorite lingo?

> > It further assumes you are using
> > the gui of visual studio and not the compiler directly via command
> > line.
> 
> This is partially true, and with a reason.  The standard build environment
> under Windows is Visual Studio.  So the docs are written for the standard
> env.

Correct. But in the SDK, one is also using exactly the same compilers
as the 'standard' GUI environment.
 
> Python is easy, extension modules are not.

That's the fun part-ly-y'rs,

Shakeeb



More information about the Python-list mailing list