diff --git a/PyFluxPro.py b/PyFluxPro.py index 8e56d42..e67f860 100644 --- a/PyFluxPro.py +++ b/PyFluxPro.py @@ -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) diff --git a/scripts/pfp_utils.py b/scripts/pfp_utils.py index 18a6095..c9bb321 100644 --- a/scripts/pfp_utils.py +++ b/scripts/pfp_utils.py @@ -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'): '''