In python, how do I read a binary file (here I need to read a .chn file) and show the result in binary format?
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Assuming that values are separated by a space:
In Python is better to use
open()overfile(), documentation says it explicitly:rbmode will open the file in binary mode.Reference:
http://docs.python.org/library/functions.html#open