I\'ve converted my scripts from Python 2.7 to 3.2, and I have a bug.
# -*- coding: utf-8 -*-
import time
from datetime import date
from lxml import etree
fr
Convert binary file to base64 & vice versa. Prove in python 3.5.2
import base64
read_file = open('/tmp/newgalax.png', 'rb')
data = read_file.read()
b64 = base64.b64encode(data)
print (b64)
# Save file
decode_b64 = base64.b64decode(b64)
out_file = open('/tmp/out_newgalax.png', 'wb')
out_file.write(decode_b64)
# Test in python 3.5.2
The outfile should be in binary mode.
outFile = open('output.xml', 'wb')