code: def split_path(path) :
      "convenience routine for splitting a path into a list of components."
      if isinstance(path, (tuple, list)) :
          result = path # assume already split
      elif path == "/" :
          result = []
      else :
          if not path.startswith("/") or path.endswith("/") :
              raise DBusError(DBUS.ERROR_INVALID_ARGS, "invalid path %s" % repr(path))
          #end if
          result = path.split("/")[1:]
      #end if
      return \
          resulf split_path(path) :
      "convenience routine for splitting a path into a list of components."
      if isinstance(path, (tuple, list)) :
          result = path # assume already split
      elif path == "/" :
          result = []
      else :
          if not path.startswith("/") or path.endswith("/") :
              raise DBusError(DBUS.ERROR_INVALID_ARGS, "invalid path %s" % repr(path))
          #end if
          result = path.split("/")[1:]
      #end if
      return \
          result
docs: convenience routine for splitting a path into a list of components.