Added logger and improved service provider
This commit is contained in:
25
src/sh_edraft/utils/__init__.py
Normal file
25
src/sh_edraft/utils/__init__.py
Normal file
@@ -0,0 +1,25 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
"""
|
||||
sh_edraft.utils
|
||||
~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
|
||||
|
||||
:copyright: (c) 2020 sh-edraft.de
|
||||
:license: MIT, see LICENSE for more details.
|
||||
|
||||
"""
|
||||
|
||||
__title__ = 'sh_edraft.utils'
|
||||
__author__ = 'Sven Heidemann'
|
||||
__license__ = 'MIT'
|
||||
__copyright__ = 'Copyright (c) 2020 sh-edraft.de'
|
||||
__version__ = '2020.12.0.1'
|
||||
|
||||
from collections import namedtuple
|
||||
|
||||
# imports:
|
||||
|
||||
VersionInfo = namedtuple('VersionInfo', 'major minor micro')
|
||||
version_info = VersionInfo(major=2020, minor=12, micro=0.1)
|
11
src/sh_edraft/utils/console.py
Normal file
11
src/sh_edraft/utils/console.py
Normal file
@@ -0,0 +1,11 @@
|
||||
from termcolor import colored
|
||||
|
||||
|
||||
class Console:
|
||||
|
||||
@staticmethod
|
||||
def write_line(string: str, color: str = None):
|
||||
if color is not None:
|
||||
print(colored(string, color))
|
||||
else:
|
||||
print(string)
|
Reference in New Issue
Block a user