marshal doesn't work with "file-like" objects
Chuck Esterbrook
echuck at mindspring.com
Fri Jan 26 13:51:33 EST 2001
C:\All\echuck\Projects\Webware>python
ActivePython 2.0, build 202 (ActiveState Tool Corp.)
based on Python 2.0 (#8, Oct 19 2000, 11:30:05) [MSC 32 bit (Intel)] on win32
>>> from StringIO import StringIO
>>> f = StringIO()
>>> f.write('hi')
>>> import marshal
>>> marshal.dump(1, f)
Traceback (most recent call last):
File "<stdin>", line 1, in ?
TypeError: marshal.dump() 2nd arg must be file
So is that a bug, a flaw or a feature?
-Chuck
--
http://webware.sourceforge.net
More information about the Python-list
mailing list