Equivalent to chr(eval(self.myhex)) without using eval?
Chad Netzer
cnetzer at mail.arc.nasa.gov
Wed Dec 18 15:27:55 EST 2002
More information about the Python-list mailing list
Wed Dec 18 15:27:55 EST 2002
- Previous message (by thread): Equivalent to chr(eval(self.myhex)) without using eval?
- Next message (by thread): Equivalent to chr(eval(self.myhex)) without using eval?
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
On Wednesday 18 December 2002 12:06, Jeff Kowalczyk wrote: > I have a class instance attribute which is a string > representation of a hex value. I need to get the chr() character > back. My last example should have been: myhex = '0x64' chr( int( myhex, 16 ) ) == 'd' where 0x64 == 100 decimal -- Bay Area Python Interest Group - http://www.baypiggies.net/ Chad Netzer cnetzer at mail.arc.nasa.gov
- Previous message (by thread): Equivalent to chr(eval(self.myhex)) without using eval?
- Next message (by thread): Equivalent to chr(eval(self.myhex)) without using eval?
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
More information about the Python-list mailing list