Esempio n. 1
0
 def _roamingUserAppDataPath(self):
     # Allow a special environment variable to override the User Data
     # Dir for a Komodo run. The main motivation for this is bug
     # 32270.
     envPath = self._userDataDir
     if envPath:
         path = os.path.expanduser(envPath)
     else:
         path = applib.roaming_user_data_dir(self._appdatadir_name,
                                             "ActiveState")
     return path
Esempio n. 2
0
 def _roamingUserAppDataPath(self):
     # Allow a special environment variable to override the User Data
     # Dir for a Komodo run. The main motivation for this is bug
     # 32270.
     envPath = self._userDataDir
     if envPath:
         path = os.path.expanduser(envPath)
     else:
         path = applib.roaming_user_data_dir(self._appdatadir_name,
                                             "ActiveState")
     return path
Esempio n. 3
0
    def getShortcutsFile(self):
        """Return the path to the shortcuts file."""
        fname = "shortcuts.xml"
        # Find go's shortcuts data file.
        # - Favour ~/.go if shortcuts.xml already exists there.
        path = None
        candidate = expanduser("~/.go/shortcuts.xml")
        if exists(candidate):
            path = candidate

        try:
            import applib
        except ImportError:
            # Probably running directly in source tree.
            sys.path.insert(0, join(dirname(dirname(dirname(dirname(abspath(__file__))))),
                "python-sitelib"))
            import applib
        if path is None:
            godir = applib.roaming_user_data_dir("Go", "TrentMick")
            path = join(godir, "shortcuts.xml")
        return path
Esempio n. 4
0
    def getShortcutsFile(self):
        """Return the path to the shortcuts file."""
        fname = "shortcuts.xml"
        # Find go's shortcuts data file.
        # - Favour ~/.go if shortcuts.xml already exists there.
        path = None
        candidate = expanduser("~/.go/shortcuts.xml")
        if exists(candidate):
            path = candidate

        try:
            import applib
        except ImportError:
            # Probably running directly in source tree.
            sys.path.insert(0, join(dirname(dirname(dirname(dirname(abspath(__file__))))),
                "python-sitelib"))
            import applib
        if path is None:
            godir = applib.roaming_user_data_dir("Go", "TrentMick")
            path = join(godir, "shortcuts.xml")
        return path