Module _strptime
[hide private]
[frames] | no frames]

Module _strptime

Strptime-related classes and functions.

CLASSES:
    LocaleTime -- Discovers and stores locale-specific time information
    TimeRE -- Creates regexes for pattern matching a string of text containing
                time information

FUNCTIONS:
    _getlang -- Figure out what language is being used for the locale
    strptime -- Calculates the time struct represented by the passed-in string


Author: Brett Cannon

Classes [hide private]
LocaleTime
Stores and handles locale-specific information related to time.
TimeRE
Handle conversion from format directives to regexes.
Functions [hide private]
 
_getlang()
 
strptime(data_string, format='%a %b %d %H:%M:%S %Y')
Return a time struct based on the input string and the format string.
Variables [hide private]
  __email__ = 'brett@python.org'
  _cache_lock = _thread_allocate_lock()
  _TimeRE_cache = {'A': '(?P<A>wednesday|thursday|saturday|tuesd...
  _CACHE_MAX_SIZE = 5
  _regex_cache = {}

Imports: time, locale, calendar, re_compile, IGNORECASE, re_escape, datetime_date, _thread_allocate_lock


Variables Details [hide private]

_TimeRE_cache

Value:
{'A': '(?P<A>wednesday|thursday|saturday|tuesday|monday|friday|sunday)\
', 'B': '(?P<B>september|february|november|december|january|october|au\
gust|march|april|june|july|may)', 'I': '(?P<I>1[0-2]|0[1-9]|[1-9])', '\
H': '(?P<H>2[0-3]|[0-1]\\d|\\d)', 'M': '(?P<M>[0-5]\\d|\\d)', 'S': '(?\
P<S>6[0-1]|[0-5]\\d|\\d)', 'U': '(?P<U>5[0-3]|[0-4]\\d|\\d)', 'W': '(?\
P<W>5[0-3]|[0-4]\\d|\\d)', 'Y': '(?P<Y>\\d\\d\\d\\d)', 'X': '(?P<H>2[0\
-3]|[0-1]\\d|\\d):(?P<M>[0-5]\\d|\\d):(?P<S>6[0-1]|[0-5]\\d|\\d)', 'Z'\
: "(?P<Z>\\'xxx|utc|gmt)", 'a': '(?P<a>mon|tue|wed|thu|fri|sat|sun)', \
...