Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #55352 > unrolled thread

Running code from source that includes extension modules

Started byMichael Schwarz <michi.schwarz@gmail.com>
First post2013-10-02 17:38 +0200
Last post2013-10-02 17:38 +0200
Articles 1 — 1 participant

Back to article view | Back to comp.lang.python


Contents

  Running code from source that includes extension modules Michael Schwarz <michi.schwarz@gmail.com> - 2013-10-02 17:38 +0200

#55352 — Running code from source that includes extension modules

FromMichael Schwarz <michi.schwarz@gmail.com>
Date2013-10-02 17:38 +0200
SubjectRunning code from source that includes extension modules
Message-ID<mailman.638.1380728304.18130.python-list@python.org>

[Multipart message — attachments visible in raw view] — view raw

Hi

I've just started looking into distutils because I need to write an
extension module in C (for performance reasons) and distutils seems to be
the most straight-forward way.

I've had success building a C file into a Python extension module using
"python setup.py build" but I am wondering what the recommended way for
using that module during development is. While writing Python code I'm used
to just run the code from the source directory. But the built extension
module's .so of course does not just end up on sys.path magically.

So how do I run my code so it will find the built extension module? Do I
pass the output directory on the command line manually or is there some
other solution? I would like to still be able to run the code from the
source directory as I'm using PyCharm to edit and debug the code.

Many thanks!

Michael

[toc] | [standalone]


Back to top | Article view | comp.lang.python


csiph-web