Hello,

I am developing a very small multi-platform app to search for a specific word or
expression in files located in a drive or directory.
So I need to open files to search for the word.

I read that opening a binary file as a text file (open(filename, 'r')) may
corrupt the file.
Consequently, before opening the file, I'd like to test it to adapt the opening
mode ('r' or 'rb').

Is there a way to make the difference between binary and text files ?

Thanks in advance for your help.

Dominique


_______________________________________________
Tutor maillist  -  [email protected]
http://mail.python.org/mailman/listinfo/tutor

Reply via email to