-
-
Save extemporalgenome/2050048 to your computer and use it in GitHub Desktop.
hex_buffer
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def hex_buffer(buf): | |
retstr=''.join(map(lambda c:'\\x%02x'%ord(c),buf)) | |
retstr="E'"+retstr+"'" | |
return retstr |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment