Re: How to transform decimal to base64

Discussion in 'Python' started by Christos TZOTZIOY Georgiou, Aug 30, 2003.

  1. On Sat, 30 Aug 2003 19:41:23 +0800, rumours say that "He Qiang"
    <> 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.
     
    Christos TZOTZIOY Georgiou, Aug 30, 2003
    #1
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Ven
    Replies:
    3
    Views:
    1,331
  2. Gilbert Fine
    Replies:
    8
    Views:
    904
    Zentrader
    Aug 1, 2007
  3. Vitaliy
    Replies:
    1
    Views:
    478
    Peter Otten
    May 29, 2008
  4. valpa
    Replies:
    11
    Views:
    1,522
    Steven D'Aprano
    Mar 24, 2009
  5. Replies:
    0
    Views:
    295
Loading...

Share This Page