File size: 416 Bytes
3d3578a
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
import os
import sys
from wasabi import msg

def get_version(dicdir):
    try:
        vpath = os.path.join(dicdir, 'version')
        with open(vpath) as vfile:
            return vfile.read().strip()
    except FileNotFoundError:
        return '0'

_curdir = os.path.dirname(__file__)

# This will be used elsewhere to initialize the tagger
DICDIR = os.path.join(_curdir, 'dicdir')
VERSION = get_version(DICDIR)