View previous topic :: View next topic |
Author |
Message |
urs mantel
Joined: 02 Nov 2010 Posts: 16 Location: Switzerland
|
Posted: Wed Apr 20, 2016 9:31 pm Post subject: Python 2.7.9 _ldap |
|
|
Hello Jean-François,
an other problem emerged from LDAP
in ldap.controls were statements to import or return _ldap
LDA12:[python279.local.ldap.controls]__init__.py;1
import _ldap,ldap
******************************
LDA12:[python279.local.ldap.controls]libldap.py;1
import _ldap,ldap
return _ldap.encode_assertion_control(self.filterstr)
return _ldap.encode_valuesreturnfilter_control(self.filterstr)
return _ldap.encode_page_control(self.size,self.cookie)
self.size,self.cookie = _ldap.decode_page_control(encodedControlValue)
but _ldap can't be imported - it's not in the directory controls
I replaced every reference to _ldap with ldap._ldap
Now it works but I'm wondering if there is a better solution.
What's the logical python_module__ldap doing
from python_vms:logicals.com
$ define/nolog 'p1' python_module__ldap "python_root:[local.ldap]_ldap.exe"
Thanks
Urs |
|
Back to top |
|
 |
jfp
Joined: 12 Jul 2004 Posts: 625
|
Posted: Thu Apr 21, 2016 6:12 am Post subject: |
|
|
Hello Urs,
A workaround is to edit python_root:[local.ldap.controls]libldap.py and python_root:[local.ldap.controls]__init__.py an replace
with
Code: | import ldap
from ldap import _ldap |
I will release, probably next week, Python 2.7.11. So I will include the fix.
Thansk for reporting,
JF |
|
Back to top |
|
 |
jfp
Joined: 12 Jul 2004 Posts: 625
|
Posted: Thu Apr 21, 2016 6:23 am Post subject: Re: Python 2.7.9 _ldap |
|
|
urs mantel wrote: |
What's the logical python_module__ldap doing
from python_vms:logicals.com
$ define/nolog 'p1' python_module__ldap "python_root:[local.ldap]_ldap.exe"
|
These logicals are use to import .exe module, format is PYTHON_MODULE_modulename
So if you do "import foo" you can have python_module_foo defined to provide the correct image.
This is useful when more than one module are packed together in one image.
JF |
|
Back to top |
|
 |
|