File: __init__.py

package info (click to toggle)
python-pytimeparse 1.1.5-4
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 104 kB
  • sloc: python: 485; makefile: 14
file content (28 lines) | stat: -rw-r--r-- 730 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
#!/usr/bin/env python
# -*- coding: utf-8 -*-

'''
__init__.py
(c) Will Roberts <wildwilhelm@gmail.com>   1 February, 2014

`timeparse` module.
'''

from __future__ import absolute_import
from codecs import open
from os import path

# Version. For each new release, the version number should be updated
# in the file VERSION.
try:
    # If a VERSION file exists, use it!
    with open(path.join(path.dirname(__file__), 'VERSION'),
              encoding='utf-8') as infile:
        __version__ = infile.read().strip()
except NameError:
    __version__ = 'unknown (running code interactively?)'
except IOError as ex:
    __version__ = "unknown (%s)" % ex

# import top-level functionality
from .timeparse import timeparse as parse