binary numbers

Darren Kirby bulliver at
Thu Oct 7 12:33:06 CEST 2004

quoth the Tim Roberts:
> Brad Tilley <bradtilley at> wrote:
> >Darren Kirby wrote:
> >>  I think our friend is looking for a module or function that turns 5
> >> into 101 (or perhaps 00000101)
> >>
> >> Brad, have a look here:
> >>
> >>
> >> -d
> >
> >Thanks, this is what I need.
> No, it isn't.  Registry REG_BINARY values are NOT binary, in the sense of
> "a string of ones and zeros".  REG_BINARY means "an arbitrary list of
> bytes".  The string "ABCD" is a perfectly legitimate value for a REG_BINARY
> registry value; it will display in a hex dump as "41 42 43 44 00".
> --
> - Tim Roberts, timr at
>   Providenza & Boekelheide, Inc.

Well, to defend my own ignorance here, I have no idea about editing a windows 
registry, in fact I do not run windows. Brad's original post was:

>This would be nice:

>import binary
>x = binary(5)

And the info I pointed him to was exactly what he asked for...
Seems a good thing that we have some "CS" types around here :)

Part of the problem since 1976
Get my public key from
"...the number of UNIX installations has grown to 10, with more expected..."
- Dennis Ritchie and Ken Thompson, June 1972 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 196 bytes
Desc: not available
URL: <>

More information about the Python-list mailing list