-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathinitparams.py
More file actions
32 lines (25 loc) · 828 Bytes
/
Copy pathinitparams.py
File metadata and controls
32 lines (25 loc) · 828 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
# initparams.py
from pathlib import Path
import os.path
import sys
# EXPTN = "MB020_cb_R_g0"
root = Path("../")
if 'FILEPATH' not in locals():
# FILEPATH = Path(os.path.join("/Volumes/bunaken/Marie", "npx", EXPTN))
script_dir = os.path.dirname(__file__)
rel_path = 'tests/testfiles'
FILEPATH = Path(os.path.join(script_dir, rel_path))
figpathstr = "figs"
# if FILEPATH.exists():
# module_path = '/params'
# module_path = Path(os.path.join(FILEPATH, 'params'))
# sys.path.append(module_path)
module_path = os.path.join(FILEPATH, 'params.py')
if module_path not in sys.path:
sys.path.append(module_path)
full_path = os.path.join(FILEPATH)
if full_path not in sys.path:
sys.path.append(full_path)
figpath = os.path.join(figpathstr)
if figpath not in sys.path:
sys.path.append(figpath)