Steven D'Aprano <steve at REMOVE-THIS-cybersource.com.au> writes: > s = "g%$f yg\n1\05" > Is this the best way, or have I missed some standard library function? It is really a shame that there is not a standard library function for this. I usually do it using hexadecimal conversion: d = int(s.encode('hex'), 16)