我正在尝试将一个文本字符串编码为base64。
我试过这样做:
name = "your name"
print('encoding %s in base64 yields = %s\n'%(name,name.encode('base64','strict')))
但这会给出以下错误:
LookupError: 'base64' is not a text encoding; use codecs.encode() to handle arbitrary codecs
我该怎么做呢?(使用Python 3.4)
https://stackoverflow.com/questions/23164058
复制相似问题