Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #91175 > unrolled thread

programmatically change windows regional settings?

Started byAlbert-Jan Roskam <fomcl@yahoo.com>
First post2015-05-24 05:50 -0700
Last post2015-05-24 05:50 -0700
Articles 1 — 1 participant

Back to article view | Back to comp.lang.python


Contents

  programmatically change windows regional settings? Albert-Jan Roskam <fomcl@yahoo.com> - 2015-05-24 05:50 -0700

#91175 — programmatically change windows regional settings?

FromAlbert-Jan Roskam <fomcl@yahoo.com>
Date2015-05-24 05:50 -0700
Subjectprogrammatically change windows regional settings?
Message-ID<mailman.13.1432471921.5151.python-list@python.org>
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

[toc] | [standalone]


Back to top | Article view | comp.lang.python


csiph-web