22 Oct 2006 06:33:50 -0700, Lucas <[EMAIL PROTECTED]>:
I known how to do it.
read() return a string. so
1) bytes = read(1) #read the file by bit.
2) chrString  = ord(bytes) #convert the string to ASCII.
3) print numberToBinary(chrString) #convert the ASCII to Binary using
my function.
4) Loop

[numberToBinary(ord(x)) for x in f.read()]    ?

--
Felipe.
-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to