read a binary file (python)

Posted by beratch on Stack Overflow See other posts from Stack Overflow or by beratch
Published on 2010-03-23T01:46:20Z Indexed on 2010/03/23 1:51 UTC
Read the original article Hit count: 447

Filed under:
|
|

Hi, I cant read a file, and I dont understand why:

f = open("test/test.pdf", "r")
data = list(f.read())
print data

Returns : []

I would like to open a PDF, and extract every bytes, and put it in a List.

What's wrong with my code ? :(

Thanks,

© Stack Overflow or respective owner

Related posts about python

Related posts about file