print a char given by hex
Klaus Bruns
klaus.bruns at teleatlas.com
Wed Oct 18 07:08:40 EDT 2000
Hi Wolfgang,
I try it and it works fine. Thank you Wolfgang!
Bye
Klaus
Wolfgang Grafen wrote:
>
> Klaus Bruns wrote:
> >
> > Hi there,
> >
> > I have a problem with printing character given by hexadecimal. My string
> > looks like this "\\x54" but what I want to have is "\x54" for printing
> > the character 'T' and not '\x54'.
> > Can someone help me please, for creating a string from "\\x54" to
> > "\x54"?
> >
> > Thank you!
> >
> > Klaus
>
> >>> chr(eval('0%s'%'\\x54'[1:]))
> 'T'
More information about the Python-list
mailing list