embedded Python and AIX

Galen hcsgss at texlife.com
Tue Jul 17 13:04:53 EDT 2001


For some reason, Google cut off half of my earlier post
GSS

I am trying to use Python embedded in a C library and am getting SEGV
upon executing "import string" or "import re" on an AIX platform with
gcc. I have built a similar program on Linux+gcc with no problem. Any
suggestions, even if you don't have experience with AIX would be
appreciated.


Detailed:
A function starts up the Python and executes a string
"execfile('pyresolve.py')". (Note: "python pyresolve.py" works great!)
This file will execute fine until it causes string or re to be
imported. (that is, imports of math, sys, and os all work fine).
Running through gdb, and adding some print statements to Python, it
seems to be crashing in initstrop() at Py_InitModule4() because it has
an incorrect address for the function. For instance look at this
output (some printf's I added to print addresses for Py_InitModule4()-
e04c0 is the function address):
      *********** 
      Hello.
      execfile('py



More information about the Python-list mailing list