daved170 wrote: > Hello everybody, > I need to read a text file byte after byte. > Eache byte is sent to a function that scramble it > and I need to write the result to binary file. > > I've got some questions - > 1) How do I read the file byte by byte > 2) Should I use streams? If so and I get my entire scrambled text in > stream can I just write it to the binary file? > > Thanks > Dave
f = open ("binaryfile", "r") bytearray = map (ord, f.read () ) Stores the content of binaryfile in the list bytearray. -- http://mail.python.org/mailman/listinfo/python-list