def _getProjenyDir(): if not MiscUtil.isRunningAsExe(): scriptDir = os.path.dirname(os.path.realpath(__file__)) return os.path.join(scriptDir, '../../..') return os.path.join(MiscUtil.getExecDirectory(), '../..')
def _getProjenyDir(): if not MiscUtil.isRunningAsExe(): scriptDir = os.path.dirname(os.path.realpath(__file__)) return os.path.join(scriptDir, '../../..') # This works for both exe builds (Bin/Prj/Data/Prj.exe) and running from source (Source/prj/_main/Prj.py) by coincidence return os.path.join(MiscUtil.getExecDirectory(), '../../..')
def __init__(self, initialParams = None): self._params = initialParams if initialParams else {} self._params['StartCurrentDir'] = os.getcwd() self._params['ExecDir'] = MiscUtil.getExecDirectory().replace('\\', '/') # We could just call self._config.getDictionary('PathVars') here but # then we wouldn't be able to use fallback (?) and override (!) characters in # our config self._regex = re.compile('^([^\[]*)(\[[^\]]*\])(.*)$')