I'd like to overwrite just one line of a binary file, based on a position set by seek(). Is there no way to do this? As far as I can tell I need to read the whole file, change the line, and write it all back out. Not exactly easy on the memory, but I see no other solution.
so far: patchme.seek(offset) patchme.write(a2b_hex(edit)) # the data is in hex first patchme.close print "Patching complete" This writes the data at the given offset, but _everything_ before it is filled with 0's. Sorry for the potentially n00b question, I'm stumped! -- http://mail.python.org/mailman/listinfo/python-list