Ejemplo n.º 1
0
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(), '../..')
Ejemplo n.º 2
0
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(), '../../..')
Ejemplo n.º 3
0
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(), '../../..')
Ejemplo n.º 4
0
    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('^([^\[]*)(\[[^\]]*\])(.*)$')