fixed path, to be able to run from aliases

This commit is contained in:
phm3
2017-08-12 19:37:16 +00:00
parent ccfc3c535e
commit 5d9c83ed36
2 changed files with 4 additions and 2 deletions

6
w.py Normal file → Executable file
View File

@@ -35,9 +35,11 @@ else:
s2s = sys.argv[1] s2s = sys.argv[1]
script_dir = os.path.dirname(__file__)
rel_path="wstations.json"
abs_file_path = os.path.join(script_dir, rel_path)
with open(abs_file_path) as data_file:
with open('wstations.json') as data_file:
data = json.load(data_file) data = json.load(data_file)

0
wstations.json Normal file → Executable file
View File