Best way of extending Python com or lnk or dll?

Pete Shinners shredwheat at mediaone.net
Tue Apr 24 12:38:05 EDT 2001


"Owen F. Ransen" <ransen_spam_me_not at nemo.it> wrote
> I'd like to extend Python and I'm not yet sure if it would
> be best to use COM (of which I know next to nothing) or
> a different method.

i wouldn't do it with static recompiling. most people aren't
too hip on rebuilding their python core just for a new module
(especially on Win and Mac (unix is a little better))

look into the distutils. they have been shipping with python
since 2.0, and now in 2.1 they have support for macos and
metrowerks.

first dipping your toes into distutils can take a bit of learning,
but look for some examples and the docs, and you won't be in any
trouble.
http://www.python.org/doc/current/dist/dist.html

this will build your extension as a shared library, and get
it all installed properly. from there you are all set to go.






More information about the Python-list mailing list