This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from datetime import datetime | |
from os.path import abspath, dirname, join | |
from pathlib import Path | |
import logging | |
import logging.config | |
import some_module | |
if __name__ == '__main__': |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
""" | |
Module providing one function, which calls a shell script and fetches it output for logging. | |
""" | |
from os.path import abspath, dirname, join | |
from os import listdir | |
import subprocess | |
import logging |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Given is a configuration file in ini-format | |
# It contains sections, parameter names and values like this | |
# | |
# [section] | |
# param1 = value1 | |
# param2 = value2 | |
# | |
# Use configparser to parse the file | |
# Pass the names for section and parameter to retrieve the configured value |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import sys | |
sys.path.insert(0,'/path/to/mod_directory') | |
# Reference: https://stackoverflow.com/questions/16114391/adding-directory-to-sys-path-pythonpath |