Skip to content

Instantly share code, notes, and snippets.

@Kwpolska
Created May 3, 2016 16:47
Show Gist options
  • Save Kwpolska/3cf154f5fc7444660a9c26a2e8adee7c to your computer and use it in GitHub Desktop.
Save Kwpolska/3cf154f5fc7444660a9c26a2e8adee7c to your computer and use it in GitHub Desktop.
Locale Printer
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