|
From: <gee...@aa...> - 2006-12-17 11:02:40
|
Hi,
The following script works fine when I call it from the python interpreter
but not when I call it from a c application (embedded python)
It crashes than in the PyImport_Import()
import ldap
import distutils.sysconfig
def TestInit():
l = ldap.open("192.168.1.2")
l.simple_bind_s("","")
l.search_s("c=BE", ldap.SCOPE_SUBTREE, "objectclass=*")
s = distutils.sysconfig.get_config_var('LINKFORSHARED')
-> Python and python-ldap are recompiled for my environment
(python generates the static library....)
Hope someone can give me a hint?
thanks,
Geert
----- Forwarded by Geert Van Muylem/Utimaco/BE on 12/17/2006 11:56 AM
-----
Geert Van Muylem/Utimaco/BE
12/17/2006 12:53 AM
To
pyt...@li...
cc
Subject
crash in PyImport_Import
Hi All,
I'm trying to run an application (on a hardened linux) which is
using embedded python. The called python script is using the python-ldap
module...
This application now crashes when calling the PyImport_Import()...
If I use however a script which does not import the ldap module,
everything works fine: no crash in this api!
Calling the script with the interpreter works also fine (I can do search
on an ldap
server with python...)
Anyone any idea what could be wrong.?
Thanks in advance,
Geert |