ctype

How do I represent a hex value in a python string?

How do I represent a hex value in a python string? Question: I have some code in C that expects char buffer that looks like this: char buf[ 64 ]; buf[0] = 0x01; buf[1] = 0x11; buf[2] = 0x61; buf[3] = 0x08; buf[4] = 0x01; I am trying to create this buffer in Python, and …

Total answers: 1