Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #46263
| From | Michael Ströder <michael@stroeder.com> |
|---|---|
| Newsgroups | comp.lang.python |
| Subject | Re: Ldap module and base64 oncoding |
| Date | 2013-05-28 09:45 +0200 |
| Organization | A noiseless patient Spider |
| Message-ID | <ko1n2s$a5c$1@dont-email.me> (permalink) |
| References | <knt87q$cm3$1@dont-email.me> <kntomp$jsn$1@dont-email.me> <knv3bs$b47$1@dont-email.me> <mailman.2269.1369699988.3114.python-list@python.org> |
Joseph L. Casale wrote:
> I had some time today, so I attempted to open the ldif files in binary mode to simply
> work with the raw byte strings but the moment the first entry was parsed, parse()
> stumbled on a character in the first entries dict and passed a dn of None for the last half?
Without seeing the LDIF data and your code I can't tell what's going on.
> If the option to avoid worrying about decoding and encoding could work, I would be
> happy to process the whole lot in byte strings. Any idea what may cause this?
I would not claim that module 'ldif' has really awesome docs.
But did you follow the example with LDIFParser in the docs?
http://www.python-ldap.org/doc/html/ldif.html#example
It illustrates that for LDIF stream processing one basically derives a class
from ldif.LDIFParser overriding method handle(). The most basic test would be
something like this:
[..]
def handle(self,dn,entry):
print '***dn',repr(dn)
pprint.pprint(entry)
And then carefully look at the output.
Ciao, Michael.
Back to comp.lang.python | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
Ldap module and base64 oncoding "Joseph L. Casale" <jcasale@activenetwerx.com> - 2013-05-24 21:00 +0000
Re: Ldap module and base64 oncoding Michael Ströder <michael@stroeder.com> - 2013-05-26 17:07 +0200
RE: Ldap module and base64 oncoding "Joseph L. Casale" <jcasale@activenetwerx.com> - 2013-05-26 16:19 +0000
Re: Ldap module and base64 oncoding Michael Ströder <michael@stroeder.com> - 2013-05-26 21:48 +0200
RE: Ldap module and base64 oncoding "Joseph L. Casale" <jcasale@activenetwerx.com> - 2013-05-27 05:15 +0000
Re: Ldap module and base64 oncoding Michael Ströder <michael@stroeder.com> - 2013-05-27 09:56 +0200
RE: Ldap module and base64 oncoding "Joseph L. Casale" <jcasale@activenetwerx.com> - 2013-05-28 00:12 +0000
Re: Ldap module and base64 oncoding Michael Ströder <michael@stroeder.com> - 2013-05-28 09:45 +0200
Re: Ldap module and base64 oncoding dieter <dieter@handshake.de> - 2013-05-27 08:04 +0200
csiph-web