Fw: crash in PyImport_Import

geert.van.muylem at aachen.utimaco.de geert.van.muylem at aachen.utimaco.de
Sun Dec 17 12:01:29 CET 2006


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
python-ldap-dev at lists.sourceforge.net
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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-ldap/attachments/20061217/6f82b6df/attachment.html>


More information about the python-ldap mailing list