programmatically change windows regional settings?
Albert-Jan Roskam
fomcl at yahoo.com
Sun May 24 08:50:03 EDT 2015
Hi,
In Windows I can change the regional settings manually in the control panel. But how do I do this programmatically? I tried setting LANG but this does not work in Windows.
Kernel32's SetLocaleInfo sounds promising, but "This setting only affects the user override portion of the locale settings; it does not set the system defaults." https://msdn.microsoft.com/en-us/library/ee491893(v=winembedded.60).aspx
Another route might be _winreg (but that's probably more brittle and, more importantly, the registry sucks)
My goal is to easily run my unittests in a number of locales (actually a platform x locale x python version matrix)
Thanks!
Albert-Jan
More information about the Python-list
mailing list