FAQ
Hello,

How to open binary file for writing into datastore. I'm trying to loop over
listdir output of images directory, How to do this without using

self.request.POST.get.file.read(), or rather how to loop this task in app
engine

file(os.curdir+"somefile").read()

UnicodeDecodeError: 'ascii' codec can't decode byte 0xd0 in position
14: ordinal not in range(128)

but when I try to read binary with b, I get IOError.


raise IOError('invalid mode: %s' % mode)
IOError: invalid mode: b

-Alex Goretoy
http://www.alexgoretoy.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-list/attachments/20090209/b31bc150/attachment.htm>

Search Discussions

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
grouppython-list @
categoriespython
postedFeb 9, '09 at 6:48a
activeFeb 9, '09 at 6:48a
posts1
users1
websitepython.org

1 user in discussion

Alex goretoy: 1 post

People

Translate

site design / logo © 2022 Grokbase