So that would explain why .png didn't work, but then why did it work with
.txt?

On 7/7/07, Richard Goedeken <[EMAIL PROTECTED]> wrote:

That is correct; The 'b' is only necessary for Windows/DOS systems;
under Unix all files are opened in Binary mode and the extra letter
isn't required.

Richard


Ian Mallett wrote:
> So like "rb", "wb", and"ab"?
>
> On 7/7/07, *Richard Jones* <[EMAIL PROTECTED]
> <mailto:[EMAIL PROTECTED]>> wrote:
>
>     On Sun, 8 Jul 2007, Ian Mallett wrote:
>     > Like how?  file("[Filepath]", "b") is invalid.
>
>     % pydoc file
>
>     Help on class file in module __builtin__:
>
>     class file(object)
>     |  file(name[, mode[, buffering]]) -> file object
>     |
>     |  Open a file.  The mode can be 'r', 'w' or 'a' for reading
(default),
>     |  writing or appending.  The file will be created if it doesn't
exist
>     |  when opened for writing or appending; it will be truncated when
>     |  opened for writing.  Add a 'b' to the mode for binary files.
>
>

Reply via email to