equal
deleted
inserted
replaced
139 raise Abort(_("%s, please check your locale settings") % k) |
139 raise Abort(_("%s, please check your locale settings") % k) |
140 |
140 |
141 def locallen(s): |
141 def locallen(s): |
142 """Find the length in characters of a local string""" |
142 """Find the length in characters of a local string""" |
143 return len(s.decode(_encoding, "replace")) |
143 return len(s.decode(_encoding, "replace")) |
|
144 |
|
145 def version(): |
|
146 """Return version information if available.""" |
|
147 try: |
|
148 import __version__ |
|
149 return __version__.version |
|
150 except ImportError: |
|
151 return 'unknown' |
144 |
152 |
145 # used by parsedate |
153 # used by parsedate |
146 defaultdateformats = ( |
154 defaultdateformats = ( |
147 '%Y-%m-%d %H:%M:%S', |
155 '%Y-%m-%d %H:%M:%S', |
148 '%Y-%m-%d %I:%M:%S%p', |
156 '%Y-%m-%d %I:%M:%S%p', |