Local user modules?

Steve Juranich sjuranic at condor.ee.washington.edu
Thu Jul 27 13:43:23 EDT 2000


I've been perusing the Python documentation.  I've just about finished
"Learhing Python" and started leafing through "Extending and Embedding the
Python Interpreter".  I would like to use Python in my research, but because
of the amount of data that I have to deal with, I will /have/ to write some
C/C++ code (I'd like to get my Ph.D. within a reasonable amount of time
<grin>).

Admittedly, I haven't read the entire "Extending..." document, but I'm
looking for a short answer here, because if I don't get the answer that I'm
looking for, that might place Python out of the realm of reasonability for
me.

Without further ado, here's my question: Is it possible for a user to write
a module in C/C++ and make that available to the Python interpreter
*without* needing to edit systemfiles like
${PYTHON_HOME}/Modules/Setup.local?

Is is possible for me to add NumPy to my Python path without actually
sticking it in the main Python system path?

So far, this has been my biggest frustration with Python.  If there is
somewhere where I could RTFM, please let me know.  I would be more than
happy to do this, but I must know how to get around this problem.

FYI, I know all about how to alter sys.path to add a directory like
~/Python/MyModules that would add modules implemented in Python, but how do
I do the same thing for objects implemented in C/C++?

Thanks a lot for the help!

--------------------------------------------------------------------------
Stephen W. Juranich								sjuranic at ee.washington.edu
Electrical Engineering  	 	   http://students.washington.edu/sjuranic
University of Washington				http://truk.ee.washington.edu/ssli





More information about the Python-list mailing list