Skip to content

Commit

Permalink
3.4
Browse files Browse the repository at this point in the history
  • Loading branch information
OmarKimo committed Jul 31, 2021
1 parent cd02859 commit b062a8b
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions plotter.py
Original file line number Diff line number Diff line change
Expand Up @@ -76,8 +76,12 @@ def run(self):
sess = requests.session()
folder_name = datetime.now().strftime("%Y-%m-%d at %I.%M.%S %p")

script_path = os.path.abspath(__file__)
print(f"script abs path: {script_path}")
if getattr(sys, 'frozen', False) :
script_path = os.path.abspath(sys.executable)
print(f"script abs path (from executable): {script_path}")
else:
script_path = os.path.abspath(__file__)
print(f"script abs path (from script): {script_path}")

cur_dir = os.path.dirname(script_path) # os.getcwd()
print(f"current directory is {cur_dir}")
Expand Down

0 comments on commit b062a8b

Please sign in to comment.