Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions PyFluxPro.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,9 +34,10 @@

# now check the logfiles and plots directories are present
base_path = pfp_utils.get_base_path()
logfiles_path = os.path.join(base_path, "logfiles", "")
plots_path = os.path.join(base_path, "plots", "")
dir_list = [logfiles_path, plots_path]
# Create logfiles folder on current directory, so that this can be outside
# the PyFluxPro folder.
logfiles_path = os.path.join(os.path.abspath("."), "logfiles")
dir_list = [logfiles_path]
for item in dir_list:
if not os.path.exists(item):
os.makedirs(item)
Expand Down
5 changes: 3 additions & 2 deletions scripts/pfp_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -2051,8 +2051,9 @@ def get_base_path():
base_path = sys._MEIPASS
else:
# running as a script
base_path = os.path.abspath(".")
return base_path
#base_path = os.path.abspath(".")
base_path = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
return base_path

def get_cfsection(cf, label, mode='quiet'):
'''
Expand Down