fixed path, to be able to run from aliases
This commit is contained in:
6
w.py
Normal file → Executable file
6
w.py
Normal file → Executable file
@@ -35,9 +35,11 @@ else:
|
||||
|
||||
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('wstations.json') as data_file:
|
||||
with open(abs_file_path) as data_file:
|
||||
data = json.load(data_file)
|
||||
|
||||
|
||||
|
0
wstations.json
Normal file → Executable file
0
wstations.json
Normal file → Executable file
Reference in New Issue
Block a user