On Thu, 28 Aug 2003 14:20:46 +1200 Michael JasonSmith <[EMAIL PROTECTED]> wrote:
> On Thu, 2003-08-28 at 13:09, Nick Rout wrote: > > matthew has interpreted the problem correctly, sorry if the question > > wasn't clear. > Ah, so z is *not* "a one byte hex value" :) no i guess its not. it is a string containing one character, which i want to interpret as a one byte value. I suppose. I just got a python book out of the centtral library, best I read it i think. > > >>> z = u'\u00f7' # Unicode character 0xf7 > >>> print z > ? > >>> print '%d' % ord(z) > 247 > >>> print '%x' % ord(z) > f7 > ok thanks (for a while I didn't realise you had code at the end of your reply, those >>>> 's make it look like a quote) > -- > Michael JasonSmith http://www.ldots.org/ > -- Nick Rout <[EMAIL PROTECTED]>
