-
Notifications
You must be signed in to change notification settings - Fork 0
/
PathHelper.py
48 lines (39 loc) · 1.29 KB
/
PathHelper.py
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
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
import os
def getMainSubfolder(folder):
return os.path.join(getMainFolder(), folder)
def getMainFolder():
return os.getcwd()
def getOutputPath(filename=None):
folder_name = 'outputs'
if filename==None:
return getMainSubfolder(folder_name)
else:
return os.path.join(getMainSubfolder(folder_name), filename)
def getLogPath(filename=None):
folder_name = 'logs'
if filename==None:
return getMainSubfolder(folder_name)
else:
return os.path.join(getMainSubfolder(folder_name), filename)
def getInputPath(filename=None):
folder_name = 'inputs'
if filename==None:
return getMainSubfolder(folder_name)
else:
return os.path.join(getMainSubfolder(folder_name), filename)
def getConfigPath(filename=None):
folder_name = 'configs'
if filename==None:
return getMainSubfolder(folder_name)
else:
return os.path.join(getMainSubfolder(folder_name), filename)
def getBinPath(filename=None):
folder_name = 'bin'
if filename==None:
return getMainSubfolder(folder_name)
else:
return os.path.join(getMainSubfolder(folder_name), filename)
# def getAppDirectoryPath():
# return os.getcwd()
# def getCorePath():
# return os.path.dirname(os.path.abspath(__file__))