Syver Enstad wrote:
> David Ascher <[EMAIL PROTECTED]> writes:
>
> > Use 'struct.pack' and then write to a file opened in binary mode
> > open('foo.dat', 'wb').write(struct.pack(...))
>
> You can also just specify bytes in a string and write it to the file,
> like this:
> open('foo.dat', 'wb').
David Ascher <[EMAIL PROTECTED]> writes:
> John Mark Agosta wrote:
>
> >
> > Where is there a Python function to write binary data directly
> > instead of ascii (or other encodings)? The pickle module binary
> > format is specific to pickle - that doesn't count, I want to be able
>
> > to spec
John Mark Agosta wrote:
>
> Where is there a Python function to write binary data directly instead
> of ascii (or other encodings)? The pickle module binary format is
> specific to pickle - that doesn't count, I want to be able to specify
> the individual bytes written to a file.
Use 'struct
Where is there a Python function to write binary data directly instead of
ascii (or other encodings)? The pickle module binary format is specific to
pickle - that doesn't count, I want to be able to specify the individual
bytes written to a file.
-john mark
_