Skip to content

Instantly share code, notes, and snippets.

@FaithPatrick
Last active August 23, 2017 10:23
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save FaithPatrick/1186d5c24695ce2bc738e8331f147123 to your computer and use it in GitHub Desktop.
Save FaithPatrick/1186d5c24695ce2bc738e8331f147123 to your computer and use it in GitHub Desktop.
import os
a = '\xd2\xbb'
open(os.path.dirname(os.path.realpath(__file__)) + '/file.txt', 'w').write(a)
with open(os.path.dirname(os.path.realpath(__file__)) + '/file.txt', "r") as f:
tmp = f.read()
print(tmp)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment