Extensions for Python2.2 ?

[email protected] Thu, 17 Jul 2003 14:11:31 +0200
Newsgroups gmane.comp.db.sapdb.sources
Message-ID <[email protected]>
I am using the eqSQL.py -Example with python 2.2.2 on Linux :

-- snip --

#
# egSQL.py call as
# python egSQL.py []
#

import sys

import sapdb

user = sys.argv [1]
pwd = sys.argv [2]
dbname = sys.argv [3]
if len (sys.argv) > 4:
host = sys.argv [4]
else:
host = ''

# connect to db
session = sapdb.connect (user, pwd, dbname, host)

-- snip --

The python-module "sapdb" is from sapdb-callif-7.4.3.25-1.rpm


I got this waring in the connect-Statement:

/opt/sapdb/depend74/misc/sapdb/sql.py:28: RuntimeWarning: Python C API 
version mismatch for module sql: This Python has API version 1011, 
module sql has version 1007.
from pythondef.sql import *

I think the reason for the warnig is that the python-module is for older 
versions of python than python 2.2
Correct ?

In an other python-program it seems for me, that I got incorrect 
Exception-objects on SQL-Errors
Can this be cause by the version-mismatch ?

By the way, is there an example with
import-Statements an exception-handling ( SQLError / CommunicationError ) ?

Should I build the Python-extension on my computer ?
I found sapdb-devtools-src.tgz on 
http://www.sapdb.org/7.4/develop/dev_linux.htm#Sources

In this tarball I found a path
./sys/src/Python/sql/python15
and
./sys/src/Python/sql/python21

Is this tarball really usable to build the Python-extensions for Python 
2.2 on Linux ?