linux - Setup universal prefix for root path script in python -
i need launch same scripts different environnments:
linux vm, local linux vm, windows vm, local windows
i use code setup fixed prefix root path each environnment:
dircwd= 'd:/google_cloud/home/aaa/project/' if os.path.expanduser('~').find('as1') >-1 , sys.platform.find('win')>-1 else 'g:/_devs/google_cloud/home/bbbb/project/' if sys.platform.find('win')> -1 else '/home/cccc/project/' if os.environ['home'].find('nol')>-1 else '/home/ccc/project/'
all scripts dependant root environnment (i can copy paste full folder structure).
is there better way determine root folder python script ?
Comments
Post a Comment