[Tutor] [Fwd: Re: Help converting base32 to base16]

Kent Johnson kent37 at tds.net
Mon Jun 18 19:37:19 CEST 2007


Forwarding to the list...

-------- Original Message --------
Subject: Re: [Tutor] Help converting base32 to base16
Date: Mon, 18 Jun 2007 12:12:46 -0500
From: lucio arteaga <mi1492 at cox.net>
To: Kent Johnson <kent37 at tds.net>
References: <fda3eaf50706180856sd9c0948qb43ce6359debc7fc at mail.gmail.com> 
<4676B33F.4040005 at tds.net>

You are the second person that in less than a moth  has had a similar.
Please  Read in page  241 of my book Algorithms and their Computer 
Solutions
written by Lucio Arteaga ,and published by  Charles E. Merrill in 1972.

----- Original Message -----
From: "Kent Johnson" <kent37 at tds.net>
To: "cms cms" <cshan.pytutor at gmail.com>
Cc: <Tutor at python.org>
Sent: Monday, June 18, 2007 11:30 AM
Subject: Re: [Tutor] Help converting base32 to base16


> cms cms wrote:
>> Hello all,
>>
>> Newbie here trying to find a module that I can use to convert a number of
>> strings (sha1 values) from base32 to base16 (hex), and vice versa. I've
>> searched this list for similar questions, the Global Module Index, the
>> Vaults of Parnassus, as well as the obvious (Google); however , I cannot
>> seem to find anything on point. While I'm sure the solution will be 
>> obvious,
>> it currently escapes me.
>
> The int() function takes a second argument of the base, so it can
> convert from base 16 or base 32 to integers. The hex() function converts
> from integer to base 16 but there is no equivalent built-in for base 32.
>
> This cookbook recipe will convert in both directions:
> http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/111286
>
> Kent
> _______________________________________________
> Tutor maillist  -  Tutor at python.org
> http://mail.python.org/mailman/listinfo/tutor
> 




More information about the Tutor mailing list