eskandari wrote:
On May 31, 12:30 pm, MRAB wrote:
eskandari wrote:
Hi,
I am a newbie in python. I have an data.pickle file which is
serialized form of an "array of strings", I want to write their
offsets in another binary file, so an C++ program can read and analyse
them.
But when I tr
On 5/31/2010 12:43 PM, eskandari wrote:
On May 31, 12:30 pm, MRAB wrote:
eskandari wrote:
Use the 'struct' module to convert the int to a bytestring, and remember
to open the file as a binary file.
Thanks alot,
I have an question, if I do so, Will the second program (C++ program)
which pro
On May 31, 12:30 pm, MRAB wrote:
> eskandari wrote:
> > Hi,
> > I am a newbie in python. I have an data.pickle file which is
> > serialized form of an "array of strings", I want to write their
> > offsets in another binary file, so an C++ program can read and analyse
> > them.
> > But when I try t
On 05/31/2010 10:56 AM, eskandari wrote:
But when I try to write offset (number) in binary file, it raise
exception below in line "offsetfile.write(offset)"
"TypeError: argument 1 must be string or read-only buffer, not int"
I search the internet, find that all suggest converting number to
stri
eskandari wrote:
Hi,
I am a newbie in python. I have an data.pickle file which is
serialized form of an "array of strings", I want to write their
offsets in another binary file, so an C++ program can read and analyse
them.
But when I try to write offset (number) in binary file, it raise
exception
Hi,
I am a newbie in python. I have an data.pickle file which is
serialized form of an "array of strings", I want to write their
offsets in another binary file, so an C++ program can read and analyse
them.
But when I try to write offset (number) in binary file, it raise
exception below in line "of