Re: Changing Locale for datetime.strptime conversions

2010-07-06 Thread Antoine Pitrou
On Tue, 06 Jul 2010 11:54:46 -0400 pyt...@bdurham.com wrote: > Antoine, > > > If you want to do this seriously, I suggest you instead take a look at > > third-party libraries such as Babel: http://babel.edgewall.org/ > > Not the OP, but has Babel implemented parsing support? Last time I > looked

Re: Changing Locale for datetime.strptime conversions

2010-07-06 Thread python
Antoine, > If you want to do this seriously, I suggest you instead take a look at > third-party libraries such as Babel: http://babel.edgewall.org/ Not the OP, but has Babel implemented parsing support? Last time I looked, Babel did a great job with locale specific formatting, but locale specifi

Re: Changing Locale for datetime.strptime conversions

2010-07-06 Thread Antoine Pitrou
On Tue, 6 Jul 2010 03:21:21 -0700 (PDT) AlienBaby wrote: > I'm still having a bit of trouble, for example trying to set the > locale to Denmark > > > locale.setlocale(locale.LC_ALL, locale.normalize('da_DK')) > > returns with > > locale.setlocale(locale.LC_ALL, locale.normalize('da_DK'))

Re: Changing Locale for datetime.strptime conversions

2010-07-06 Thread AlienBaby
I'm still having a bit of trouble, for example trying to set the locale to Denmark locale.setlocale(locale.LC_ALL, locale.normalize('da_DK')) returns with locale.setlocale(locale.LC_ALL, locale.normalize('da_DK')) File "C:\Python26\lib\locale.py", line 494, in setlocale return _setl

Re: Changing Locale for datetime.strptime conversions

2010-07-06 Thread AlienBaby
On 6 July, 10:55, AlienBaby wrote: > Hi, > > I'm using datetime.strptime(string,format) to convert dates parsed > from a file into datetime objects. > > However, the files come from various places around the world, and > strptime fails when non-english month names are used. > > strptime says it co

Changing Locale for datetime.strptime conversions

2010-07-06 Thread AlienBaby
Hi, I'm using datetime.strptime(string,format) to convert dates parsed from a file into datetime objects. However, the files come from various places around the world, and strptime fails when non-english month names are used. strptime says it converts month names using the current locales versio