Python Aborts when I quit

tilwe ashish.tilwe at db.com
Thu Oct 18 10:58:55 EDT 2001


Hi,
   I am relatively new to Python, but I am getting a strange error when
I quit from Python. Here is the code:
>>> import sys
>>> import c_plusplus_module
>>> print testvar()
"OK"
>>> sys.exit(0)
Abort

The c_plusplus_module imports a library developed in C++ to interface Python.
It look as follows
----------------------------------------------------
#File c_plusplus_module.py
import libPytAPI

def testvar():
    var foo = libPytAPI.load()
    var retvar = "Failed"
    if foo == 0:
       retvar = "OK"
    return retvar

----------------------------------------------------

I am puzzled. Why should the import be OK, but when I exit
the proocess aborts?.
Can anyone indicate what could be potentially wrong in the code?

ATILWE



More information about the Python-list mailing list