OT - strptime problems

Werner F. Bruhin werner.bruhin at free.fr
Sat Feb 2 08:07:40 PST 2008


Sorry for being a bit OT.

I am in the midst of converting over to the Unicode build and I am 
running into a problem with my custom column sorter for dates

I wonder if anyone can give me a hint why this would not work:

x
u'16 ao\xfbt 2005'
 >>> tempformat
u'%d %b %Y'
 >>> time.strptime(x, tempformat)
  File "<console>", line 1, in <module>
  File "C:\Python25\lib\_strptime.py", line 331, in strptime
    (data_string, format))
''' <type 'exceptions.ValueError'> : time data did not match format:  
data=16 août 2005  fmt=%d %b %Y '''
 >>> print x
16 août 2005

I tried converting things to string but I still get the same error.  It 
is strange in my app I actually get a decode error when I run the 
equivalent code - so I am totally confused.

Werner




More information about the wxpython-users mailing list