Created
January 18, 2016 11:59
-
-
Save harunyasar/a5c5f16657947e50912d to your computer and use it in GitHub Desktop.
Python open file binary mode
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import base64 | |
file_data = base64.urlsafe_b64decode(pdf.encode('utf8')) | |
with open('pdf_name.pdf', 'wb') as file: | |
file.write(file_data) | |
return pdf |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment