About 594 results
Open links in new tab
  1. python - Reading an entire binary file [SOLVED] | DaniWeb

    Two common pitfalls here: (1) calling read () with no size loads the entire file into RAM, which will thrash or freeze a machine on multi-GB inputs, and (2) binascii.hexlify () doubles the data size (2 ASCII …

  2. python - Reading a .raw file and display as hex [SOLVED] | DaniWeb

    Jan 15, 2018 · Also, binary files are not line-oriented, so iterating a file object (or calling .readline()) will not produce predictable results for raw data. Stream the file in fixed-size chunks and format the bytes …

  3. python - Reading floating number from binary bytes | DaniWeb

    Hello Daniweb, I would like to read binary data into floating point numbers. I'd be happy with a 1-D array (or vector) or a 2-D array. Just something I can write to a text file. I attached a small sample of this …

  4. python - Reading image as binary file [SOLVED] | DaniWeb

    The binary string output is pretty useless, since you can never recover any data back. If you want to send binary image data as a string, you have to use Python module base64.

  5. python - Beginner: How do I read in one bit/byte ... | DaniWeb

    In Python 2.6 you cannot read single bits directly from a file; files are byte-oriented. The usual pattern is to read bytes in binary mode and unpack each byte into 8 bits.

  6. python - Read Binary data from file | DaniWeb

    Hello everybody, I am after a little help using python to read in data from a binary file. This is what i got so far: [CODE] import struct infile = "friday.bin"

  7. python - Read binary file, and write to another [SOLVED] | DaniWeb

    Dec 7, 2010 · The code should read bytes (!) from a binary file, and write them to another file. It's like copy the binary file, but get it through stdin, and write it to stdout.

  8. python - Encode and decode binary data with base64 | DaniWeb

    The issue is file modes. On Windows, writing binary data in text mode can change bytes (newline translation), which corrupts both the original payload and the Base64 text. Always open binary …

  9. Text Encryption/Decryption with XOR (Python) | DaniWeb

    This happens to have an operation to create an array of 1-byte wide integers from a list of Python integers, and every array can be written to a file or converted to a string as a binary data structure.

  10. python - Ignore CRLF ("\r\n") in a csv file [SOLVED] | DaniWeb

    Jul 7, 2010 · In Python it is good to prefer to use open ('file.csv', 'rb') the binary mode might be necessary to turn off the Python magic processing of new lines. If you could give sample of your …