loc = locale.setlocale(locale.LC_TIME, ('de', 'de'))
try:
    date = datetime.date.strptime(input, '%d. %b. %Y')
except:
    loc = locale.setlocale(locale.LC_TIME, ('en', 'us'))
date = datetime.date.strptime(input, '%d. %b. %Y')
Handling international dates in python