From python-ldap-dev Wed Dec 29 15:47:10 2004 From: Wido Depping Date: Wed, 29 Dec 2004 15:47:10 +0000 To: python-ldap-dev Subject: Re: Export to LDIF Message-Id: <127079e10412290747b625c70 () mail ! gmail ! com> X-MARC-Message: https://marc.info/?l=python-ldap-dev&m=110433539730790 On Tue, 21 Dec 2004 08:04:05 +0100, Michael Ströder wrote: > Wido Depping wrote: > > Is it possible that the LDIFWriter class can be extended to return the > > LDIF string and don't write it to a file handler? This is useful if > > you want to save the content to a resource which is not accessible > > with a file handler. > > Use StringIO or for that. > > try: > from cStringIO import StringIO > except ImportError: > from StringIO import StringIO Thanks for the tip. Initially I was searching for something like this, but wasn't successfull. Maybe I need to get to know the python standard library even more :) mfg. Wido -- Wido Depping ICQ: 51303067 AIM: wido3379 Jabber: wido@jabber.ccc.de Blog: http://widoww.blogspot.com ------------------------------------------------------- SF email is sponsored by - The IT Product Guide Read honest & candid reviews on hundreds of IT Products from real users. Discover which products truly live up to the hype. Start reading now. http://productguide.itmanagersjournal.com/ _______________________________________________ Python-LDAP-dev mailing list Python-LDAP-dev@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/python-ldap-dev