Rajarshi Guha <rajarshi at presidency.com> wrote in news:pan.2002.11.15.17.31.32.977054.25911 at presidency.com: > How can I read N bytes from a file opened in binary mode. simply f.read(N) > Basically I'm > trying to check that a PDF file is indeed a PDF file on a unixish system? consider the "file" command chris -- Chris <cliechti at gmx.net>