C shared object files

Charles G Waldman Charles.G.Waldman at p98.f112.n480.z2.fidonet.org
Fri Jul 2 14:08:28 EDT 1999


From: Charles G Waldman <cgw at fnal.gov>


I'm sure there are plenty of people on this list, including myself,
who'd be glad to help you.  As far as building an extension module
from your .c file, it would help to know what kind of platform you're
on.  If you're on a Unix platform with gcc, the command would look
something like:

gcc -I/path/to/python/includes -c myfile.c
gcc -shared -o mymodule.so myfile.o

As far as checking for presence of a module at runtime, the simplest
thing would be:

try:
	import module
except ImportError:
       #it doesn't exist...

Aren't there any local Python gurus at llnl.gov?






More information about the Python-list mailing list