(self, path)
Gets the preferences path value for a given path.
Gets the preferences path value for a given path.
Gets the preferences path value for a given path .
def GetPathValue(self, path):
    """Gets the preferences path value for a given path."""
    base = os.path.basename(path)
    tree = os.path.dirname(path)
    settings = SCPreferencesPathGetValue(self.session, tree)
    if not settings:
      # SCPreferencesPathGetValue returns a dict or None if the path doesn't
      # exist. Just pass along None in the second case.
      return None
    if base is '':
      # If base is '', the path is '/' so we just return the whole tree
      return settings
    if base in settings:
      return settings[base]
    else:
      return None
def GetPathValue ( self , path ) : base = os . path . basename ( path ) tree = os . path . dirname ( path ) settings = SCPreferencesPathGetValue ( self . session , tree ) if not settings : # SCPreferencesPathGetValue returns a dict or None if the path doesn't # exist. Just pass along None in the second case. return None if base is '' : # If base is '', the path is '/' so we just return the whole tree return settings if base in settings : return settings [ base ] else : return None