[Zope-dev] Re: StringIO and Zope
Tor Oskar Wilhelmsen
toroskar at chello.no
Mon Jul 12 13:04:17 EDT 2004
No the problem is exactly the same with StringIO and cStringIO
-Tow
----- Original Message -----
From: "Tres Seaver" <tseaver at zope.com>
Newsgroups: gmane.comp.web.zope.devel
To: "Tor Oskar Wilhelmsen" <toroskar at chello.no>
Sent: Monday, July 12, 2004 7:01 PM
Subject: Re: StringIO and Zope
> Tor Oskar Wilhelmsen wrote:
>
> > I have a problem with python 2.3.3 and Zope 2.7.0. When I Execute the
> > code below, Python just get som unhandled exceptions, and crash? Why?
> > Does anyone know???
> >
> > from cStringIO import StringIO
> > #pic[3] is a blob in a database
> > data = pic[3]
> >
> > fil = StringIO(str(data)) #this line makes Zope and Python crash!!!!
>
> Does the problem go away if you change the import to:
>
> from StringIO import StringIO
>
> From the cStringIO library documentation
> (http://docs.python.org/lib/module-cStringIO.html):
>
> > Unlike the memory files implemented by the StringIO module, those
> > provided by this module are not able to accept Unicode strings that
> > cannot be encoded as plain ASCII strings.
>
>
> Tres.
> --
> ===============================================================
> Tres Seaver tseaver at zope.com
> Zope Corporation "Zope Dealers" http://www.zope.com
>
More information about the Zope-Dev
mailing list