This commit is contained in:
Oleg Korshul
2019-11-09 23:10:59 +03:00
parent 4decc20f59
commit 4f1831010c
2 changed files with 8 additions and 4 deletions

View File

@ -5,8 +5,11 @@ import subprocess
import sys
import config
def get_script_dir():
scriptPath = os.path.realpath(__file__)
def get_script_dir(file=""):
test_file = file
if ("" == file):
test_file = __file__
scriptPath = os.path.realpath(test_file)
scriptDir = os.path.dirname(scriptPath)
return scriptDir