changing an entry ina binary file using python --URGENT

Shine Anne m2ids2005 at gmail.com
Thu Aug 3 05:08:20 PDT 2006


hi all,

please help me...i am really in an awkard position.
i need to change an entry in  a binary file.
I am having a binary file EG.bin and EG.cfg.
i need to open the cfg file and change an entry in that..
right now what ppl are doing is ... opening the cfg(configuration file) file
using VC++
then change the content manually
but i need to write  a python script that solves the problem.
i tried opening the file using

binfile =3D file("EG.cfg","rb")

for line in binfile.readlines():
    print line
# Now close it again
binfile.close()
what now happens is i am not getting the values .... instead of  that i'm
getting junk values..
Any idea how to open a binary file so that we can get the values
correctly??????

-- =

Regards,

Shine Anne
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.wxwidgets.org/pipermail/wxpython-users/attachments/200608=
03/0e9feeda/attachment.htm


More information about the wxpython-users mailing list