[XML-SIG] Re: reading a text file using python

Fredrik Lundh fredrik@pythonware.com
Sun, 23 Feb 2003 09:31:02 +0100


"aravind c" wrote:
>
>       I need some help on reading a file using python.  I have
> used C to write a structure into a file using fwrite:
>
>         fwrite(&st,sizeof(st),1,f);

for information on how to read and write files, I suggest
reading the Python tutorial:

    http://www.python.org/doc/current/tut/tut.html
    http://www.python.org/doc/current/tut/node9.html#SECTION009200000000000000000

to pack and unpack binary data, use the struct module:

    http://www.python.org/doc/current/lib/module-struct.html

for appropriate forums for general Python questions, see:

    http://www.python.org/Help.html

</F>