Fixing Python's "unknown locale"

One problem I run into every time I upgrade Python or install a new Ubuntu computer is this (caused by me running locale en_DK) raise ValueError, 'unknown locale: %s' % localename ValueError: unknown locale: en_DK I am not an Python expert (not even remotely) so I used some time looking for some sort of fix for this problem. Open the file /usr/lib/python2.5/locale.py and find the line containing en_gb (around line 760) and then add this above:...

August 17, 2008 · 1 min · alj