read n bytes from a binary file
sismex01 at hebmex.com
sismex01 at hebmex.com
Fri Nov 15 17:39:19 EST 2002
More information about the Python-list mailing list
Fri Nov 15 17:39:19 EST 2002
- Previous message (by thread): Possible Win32 Tkinter bug?
- Next message (by thread): read n bytes from a binary file
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
> From: Rajarshi Guha [mailto:rajarshi at presidency.com] > Sent: Friday, November 15, 2002 4:32 PM > > 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, > too simple... >>> f = file("BTB.zip","rb") >>> f.read(8) 'PK\x03\x04\x14\x00\x02\x00' >>> HTH! -gustavo
- Previous message (by thread): Possible Win32 Tkinter bug?
- Next message (by thread): read n bytes from a binary file
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
More information about the Python-list mailing list