[prev in list] [next in list] [prev in thread] [next in thread] 

List:       python-ldap-dev
Subject:    Re: Export to LDIF
From:       Wido Depping <wido.depping () gmail ! com>
Date:       2004-12-29 15:47:10
Message-ID: 127079e10412290747b625c70 () mail ! gmail ! com
[Download RAW message or body]

On Tue, 21 Dec 2004 08:04:05 +0100, Michael Ströder
<michael@stroeder.com> 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

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic