Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Search results for query: *

  1. 6a6f686e

    Python Error unpacking hex data

    I found the answer here: http://mail.python.org/pipermail/python-bugs-list/2004-December/026519.html U+201A (SINGLE LOW-9 QUOTATION MARK) should be fine, except that \x1A is converted to EOF on Windows; then expat chokes on all the unclosed tags. The Solution: Open the file 'rb'.
  2. 6a6f686e

    Python Error unpacking hex data

    """ I wrote this script to illustrate the problem: '\x1a' hex string gets truncated when read from file Does anyone know a workaround? """ import struct x = struct.pack('chhh','a', 6668,22,33) # x is now 'a\x00\x0c\x1a\x16\x00!\x00' # just to prove that it is working: print...

Part and Inventory Search

Back
Top