I am trying to encode a text string to base64.
i tried doing this :
name = \"your name\" print(\'encoding %s in base64 yields = %s\\n\'%(name,name.en
It turns out that this is important enough to get it's own module...
import base64 base64.b64encode(b'your name') # b'eW91ciBuYW1l' base64.b64encode('your name'.encode('ascii')) # b'eW91ciBuYW1l'