This commit is contained in:
ingvar1995 2016-05-28 22:43:51 +03:00
parent c27c35fcc0
commit 02507ab8b4
9 changed files with 37 additions and 6 deletions

View file

@ -20,6 +20,15 @@ def path_to_data(name):
return os.path.dirname(os.path.realpath(__file__)) + '/' + name + '/'
def log(name, data):
"""
:param name: plugin unique name
:param data: data for saving in log
"""
with open(path_to_data(name) + 'logs.txt', 'a') as fl:
fl.write(str(data) + '\n')
class PluginSuperClass(object):
"""
Superclass for all plugins. Plugin is python module with at least one class derived from PluginSuperClass.