Created
May 3, 2016 16:47
-
-
Save Kwpolska/3cf154f5fc7444660a9c26a2e8adee7c to your computer and use it in GitHub Desktop.
Locale Printer
This file contains hidden or 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 locale | |
import datetime | |
sl = locale.setlocale | |
# Clear the file | |
f = open("NikolaDebug.txt", "w") | |
f.close() | |
def fancy_setlocale(*args, **kwargs): | |
f = open("NikolaDebug.txt", "a") | |
f.write("{0} {1} {2}\r\n".format( | |
datetime.datetime.now(), args, kwargs)) | |
f.close() | |
sl(*args, **kwargs) | |
locale.setlocale = fancy_setlocale |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment