read n bytes from a binary file

Rajarshi Guha rajarshi at presidency.com
Fri Nov 15 17:31:33 EST 2002


Hi,
  I have a simple question, but I cant seem to find the function to do
it!
How can I read N bytes from  a file opened in binary mode. Basically I'm
trying to check that a PDF file is indeed a PDF file

thanks,



More information about the Python-list mailing list