Message250507
no close plz,
i using python 2.7.3 i get this output without "\n"?
code:
json_obj='{"userName": "admin", "password": "admin"}'
enc = json_obj.encode("base64")
print enc
enc_sec = re.sub('\n$','',enc)
print enc_sec
sec = enc_sec.encode("base64")
print sec
Output:
{"userName": "admin", "password": "admin"}
eyJ1c2VyTmFtZSI6ICJhZG1pbiIsICJwYXNzd29yZCI6ICJhZG1pbiJ9
ZXlKMWMyVnlUbUZ0WlNJNklDSmhaRzFwYmlJc0lDSndZWE56ZDI5eVpDSTZJQ0poWkcxcGJpSjk= |
|
Date |
User |
Action |
Args |
2015-09-12 00:59:27 | Ramin Farajpour Cami | set | recipients:
+ Ramin Farajpour Cami, martin.panter |
2015-09-12 00:59:27 | Ramin Farajpour Cami | set | messageid: <1442019567.43.0.226723106042.issue25075@psf.upfronthosting.co.za> |
2015-09-12 00:59:27 | Ramin Farajpour Cami | link | issue25075 messages |
2015-09-12 00:59:27 | Ramin Farajpour Cami | create | |
|