Thank you, Pierre,

But I'm looking for a solution to convert a Hex number into binary, decimal, 
interger numbers.

E.g.:

What is the the binary value of the hex number 1F4.

Is there a function available, or how can it be done?



Kind regards and a nice weekend

  Heiko

 

-----Original Message-----
From: Pierre Barbier de Reuille [mailto:[EMAIL PROTECTED] 
Sent: Friday, February 04, 2005 2:35 PM
To: Tamm, Heiko
Cc: [email protected]
Subject: Re: [Tutor] Hex to Str

Given you have a number in 'a' :

hex(a)

returns the hexadecimal representation of 'a' as a string !
You can also try :

"%x" % a

After that, I don't know if there is some builtin to print a number in any base 
you want !

Pierre

Tamm, Heiko a �crit :
> Hello,
>  
> I like to know, if it's possible to convert a Hex number into String 
> or other formats?
>  
> How can it be done?
>  
>  
> Kind regards
>  
>   Heiko
> 
> 
> 
> ----------------------------------------------------------------------
> --
> 
> _______________________________________________
> Tutor maillist  -  [email protected]
> http://mail.python.org/mailman/listinfo/tutor

--
Pierre Barbier de Reuille

INRA - UMR Cirad/Inra/Cnrs/Univ.MontpellierII AMAP Botanique et 
Bio-informatique de l'Architecture des Plantes TA40/PSII, Boulevard de la 
Lironde
34398 MONTPELLIER CEDEX 5, France

tel   : (33) 4 67 61 65 77    fax   : (33) 4 67 61 56 68
_______________________________________________
Tutor maillist  -  [email protected]
http://mail.python.org/mailman/listinfo/tutor

Reply via email to