Skip to content

Commit

Permalink
use __file__ attribute of globalVariables for finding parent_dir
Browse files Browse the repository at this point in the history
  • Loading branch information
Baalkikhaal committed Oct 8, 2020
1 parent afacafe commit 052555d
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions KerrPy/File/loadFilePaths.py
Expand Up @@ -7,9 +7,9 @@

import os, os.path

from globalVariables import debug, raw_dir, proc_dir, seq_file, samplename
from globalVariables import debug, raw_dir, proc_dir, samplename

from globalVariables import mpl_stylesheet
from globalVariables import mpl_stylesheet, __file__


#### global read only #######
Expand All @@ -24,7 +24,10 @@
controls_filename = 'controls.npy'

######### Post Processing folders and files ###################
parent_dir_abs = os.path.abspath(os.path.join(os.pardir, os.pardir))

# From the `__file__` attribute of globalVariables, let us find the
# parent directory. We assume globalVariables is in the parent directory
parent_dir_abs = os.path.dirname(__file__)

if debug: print(f'parent_dir_abs: {parent_dir_abs}')

Expand Down

0 comments on commit 052555d

Please sign in to comment.