If x is the file object, you're looking for x.read() not
x.file.read(). I've never had a problem with it. Python is pretty well
tested, I've never run across an error in the language itself or the
stdlib in 4 years of using the language.

On 9/25/06, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
>
> Does x.file.read() work in binary mode on windows?
>
>
> Lets say I have a form where a user uploads an image.
> I'm running TG on windows and it seems like the file.read() is being
> read incorrectly.  Possibly it is not being read in binary mode?
> x is the file object which is passed into the function.
>
>
> This is an example of file IO NOT in binary mode:
>      f = open('FILE_NAME', 'r')
> and en example IN binary mode:
>      f = open('FILE_NAME', 'rb')
>
>
> >
>

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"TurboGears" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/turbogears
-~----------~----~----~----~------~----~------~--~---

Reply via email to