KnowledgeHub
Questions
Tags
Users
Search
Alex Rivera
|
Logout
Edit Question
Title
Body
I've made a little python program that reads binary from a file and stores it to a text file, read the text file and store the binary. But, I can't get the binary to work... it reads the files like this: f_bin = open(bin_file,"rb") to_bin_data = f_bin.read() bin_data = bin(reduce(lambda x, y: 256*x+y, (ord(c) for c in to_bin_data), 0)) f_bin.close() this one doesen't work for me... Convert binary to ASCII and vice versa Something like this webpage: http://www.roubaixinteractive.com/PlayGround/Binary_Conversion/Binary_To_Text.asp Edit: I've now made a long if else script for it, but thanks for the answers
Tags (comma-separated)
Save Edits
Cancel