Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Python > Re: How to transform decimal to base64

Reply
Thread Tools

Re: How to transform decimal to base64

 
 
Christos TZOTZIOY Georgiou
Guest
Posts: n/a
 
      08-30-2003
On Sat, 30 Aug 2003 19:41:23 +0800, rumours say that "He Qiang"
<(E-Mail Removed)> might have written:

>base64 module only provide interface for string to base64, I want to know
>how to transform decimal digit to base64.
>For example, 1 -> base64, not "1".


chr(1).encode("base64")

If you have many bytes to convert, you can use an array.array('B') and,
when you have built the array, then use its .tostring() method.
--
TZOTZIOY, I speak England very best,
Microsoft Security Alert: the Matrix began as open source.
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Re: How include a large array? Edward A. Falk C Programming 1 04-04-2013 08:07 PM
Error: Cannot convert Decimal("0.0000") to Decimal Vitaliy Python 1 05-29-2008 10:36 AM
TypeError: unsupported operand type(s) for -: 'Decimal' and 'Decimal'. Why? Gilbert Fine Python 8 08-01-2007 01:58 AM
Decimal to Packed Decimal Conversion in C++ Ven C++ 3 08-01-2006 03:56 PM
blocking I/O with javax.xml.parsers.DocumentBuilder.parse() and javax.xml.transform.Transformer.transform() jazzdman@gmail.com Java 1 03-27-2005 06:56 AM



Advertisments