當前位置: 首頁>>代碼示例>>Python>>正文


Python signals.SignalDispatcher類代碼示例

本文整理匯總了Python中ranger.ext.signals.SignalDispatcher的典型用法代碼示例。如果您正苦於以下問題:Python SignalDispatcher類的具體用法?Python SignalDispatcher怎麽用?Python SignalDispatcher使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。


在下文中一共展示了SignalDispatcher類的14個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Python代碼示例。

示例1: __init__

	def __init__(self):
		SignalDispatcher.__init__(self)
		self.__dict__['_localsettings'] = dict()
		self.__dict__['_settings'] = dict()
		for name in ALLOWED_SETTINGS:
			self.signal_bind('setopt.'+name,
					self._raw_set_with_signal, priority=0.2)
開發者ID:pombredanne,項目名稱:ranger,代碼行數:7,代碼來源:settingobject.py

示例2: __init__

	def __init__(self, args, descr, silent=False, read=False):
		SignalDispatcher.__init__(self)
		Loadable.__init__(self, self.generate(), descr)
		self.args = args
		self.silent = silent
		self.read = read
		self.stdout_buffer = ""
開發者ID:MattWoelk,項目名稱:ranger,代碼行數:7,代碼來源:loader.py

示例3: __init__

    def __init__(self, ui=None, bookmarks=None, tags=None, paths=None):
        """Initialize FM."""
        Actions.__init__(self)
        SignalDispatcher.__init__(self)
        self.ui = ui if ui is not None else UI()
        self.start_paths = paths if paths is not None else ['.']
        self.directories = dict()
        self.bookmarks = bookmarks
        self.current_tab = 1
        self.tabs = {}
        self.tags = tags
        self.restorable_tabs = deque([], ranger.MAX_RESTORABLE_TABS)
        self.py3 = sys.version_info >= (3, )
        self.previews = {}
        self.default_linemodes = deque()
        self.loader = Loader()
        self.copy_buffer = set()
        self.do_cut = False
        self.metadata = MetadataManager()
        self.image_displayer = None
        self.run = None
        self.rifle = None
        self.thistab = None

        try:
            self.username = pwd.getpwuid(os.geteuid()).pw_name
        except KeyError:
            self.username = 'uid:' + str(os.geteuid())
        self.hostname = socket.gethostname()
        self.home_path = os.path.expanduser('~')

        mimetypes.knownfiles.append(os.path.expanduser('~/.mime.types'))
        mimetypes.knownfiles.append(self.relpath('data/mime.types'))
        self.mimetypes = mimetypes.MimeTypes()
開發者ID:nfnty,項目名稱:ranger,代碼行數:34,代碼來源:fm.py

示例4: __init__

    def __init__(self, ui=None, bookmarks=None, tags=None, paths=["."]):
        """Initialize FM."""
        Actions.__init__(self)
        SignalDispatcher.__init__(self)
        if ui is None:
            self.ui = UI()
        else:
            self.ui = ui
        self.start_paths = paths
        self.directories = dict()
        self.log = deque(maxlen=20)
        self.bookmarks = bookmarks
        self.current_tab = 1
        self.tabs = {}
        self.tags = tags
        self.restorable_tabs = deque([], ranger.MAX_RESTORABLE_TABS)
        self.py3 = sys.version_info >= (3,)
        self.previews = {}
        self.loader = Loader()
        self.copy_buffer = set()
        self.do_cut = False

        try:
            self.username = pwd.getpwuid(os.geteuid()).pw_name
        except:
            self.username = "uid:" + str(os.geteuid())
        self.hostname = socket.gethostname()
        self.home_path = os.path.expanduser("~")

        self.log.append("ranger {0} started! Process ID is {1}.".format(__version__, os.getpid()))
        self.log.append("Running on Python " + sys.version.replace("\n", ""))

        mimetypes.knownfiles.append(os.path.expanduser("~/.mime.types"))
        mimetypes.knownfiles.append(self.relpath("data/mime.types"))
        self.mimetypes = mimetypes.MimeTypes()
開發者ID:radhermit,項目名稱:ranger,代碼行數:35,代碼來源:fm.py

示例5: __init__

 def __init__(self, args, descr, silent=False, read=False, input=None,
         kill_on_pause=False):
     SignalDispatcher.__init__(self)
     Loadable.__init__(self, self.generate(), descr)
     self.args = args
     self.silent = silent
     self.read = read
     self.stdout_buffer = ""
     self.input = input
     self.kill_on_pause = kill_on_pause
開發者ID:anekos,項目名稱:ranger,代碼行數:10,代碼來源:loader.py

示例6: __init__

 def __init__(self, args, descr,  # pylint: disable=too-many-arguments
              silent=False, read=False, input=None,  # pylint: disable=redefined-builtin
              kill_on_pause=False, popenArgs=None):
     SignalDispatcher.__init__(self)
     Loadable.__init__(self, self.generate(), descr)
     self.args = args
     self.silent = silent
     self.read = read
     self.stdout_buffer = ""
     self.input = input
     self.kill_on_pause = kill_on_pause
     self.popenArgs = popenArgs  # pylint: disable=invalid-name
開發者ID:phantasea,項目名稱:ranger,代碼行數:12,代碼來源:loader.py

示例7: __init__

 def __init__(self):
     SignalDispatcher.__init__(self)
     self.__dict__['_localsettings'] = dict()
     self.__dict__['_localregexes'] = dict()
     self.__dict__['_tagsettings'] = dict()
     self.__dict__['_settings'] = dict()
     for name in ALLOWED_SETTINGS:
         self.signal_bind('setopt.' + name, self._sanitize,
                          priority=SIGNAL_PRIORITY_SANITIZE)
         self.signal_bind('setopt.' + name, self._raw_set_with_signal,
                          priority=SIGNAL_PRIORITY_SYNC)
     for name, values in ALLOWED_VALUES.items():
         assert values
         assert name in ALLOWED_SETTINGS
         self._raw_set(name, values[0])
開發者ID:phantasea,項目名稱:ranger,代碼行數:15,代碼來源:settings.py

示例8: __init__

	def __init__(self, ui=None, bookmarks=None, tags=None):
		"""Initialize FM."""
		Actions.__init__(self)
		SignalDispatcher.__init__(self)
		self.ui = ui
		self.log = deque(maxlen=20)
		self.bookmarks = bookmarks
		self.tags = tags
		self.tabs = {}
		self.py3 = sys.version_info >= (3, )
		self.previews = {}
		self.current_tab = 1
		self.loader = Loader()

		self.log.append('Ranger {0} started! Process ID is {1}.' \
				.format(__version__, os.getpid()))
		self.log.append('Running on Python ' + sys.version.replace('\n',''))
開發者ID:Dieterbe,項目名稱:ranger,代碼行數:17,代碼來源:fm.py

示例9: __init__

    def __init__(self, path):
        SignalDispatcher.__init__(self)
        self.path = abspath(expanduser(path))
        self._cf = None
        self.pathway = ()
        self.directories = {}
        self.keybuffer = KeyBuffer()
        self.keymaps = KeyMaps(self.keybuffer)
        self.copy = set()
        self.history = History(self.settings.max_history_size, unique=False)

        try:
            self.username = pwd.getpwuid(os.geteuid()).pw_name
        except:
            self.username = "uid:" + str(os.geteuid())
        self.hostname = socket.gethostname()
        self.home_path = os.path.expanduser("~")

        self.signal_bind("move", self._set_cf_from_signal, priority=0.1, weak=True)
開發者ID:sharklasers,項目名稱:livarp_0.3.9,代碼行數:19,代碼來源:environment.py

示例10: __init__

    def __init__(self, ui=None, bookmarks=None, tags=None):
        """Initialize FM."""
        Actions.__init__(self)
        SignalDispatcher.__init__(self)
        self.ui = ui
        self.log = deque(maxlen=20)
        self.bookmarks = bookmarks
        self.tags = tags
        self.tabs = {}
        self.py3 = sys.version_info >= (3,)
        self.previews = {}
        self.current_tab = 1
        self.loader = Loader()

        self.log.append("ranger {0} started! Process ID is {1}.".format(__version__, os.getpid()))
        self.log.append("Running on Python " + sys.version.replace("\n", ""))

        mimetypes.knownfiles.append(os.path.expanduser("~/.mime.types"))
        mimetypes.knownfiles.append(self.relpath("data/mime.types"))
        self.mimetypes = mimetypes.MimeTypes()
開發者ID:benemal,項目名稱:ranger,代碼行數:20,代碼來源:fm.py

示例11: __init__

	def __init__(self, path):
		SignalDispatcher.__init__(self)
		self.path = abspath(expanduser(path))
		self._cf = None
		self.pathway = ()
		self.directories = {}
		self.keybuffer = KeyBuffer(None, None)
		self.keymanager = KeyManager(self.keybuffer, ALLOWED_CONTEXTS)
		self.copy = set()
		self.history = History(self.settings.max_history_size, unique=False)

		try:
			self.username = pwd.getpwuid(os.geteuid()).pw_name
		except:
			self.username = 'uid:' + str(os.geteuid())
		self.hostname = socket.gethostname()
		self.home_path = os.path.expanduser('~')

		self.signal_bind('move', self._set_cf_from_signal, priority=0.1,
				weak=True)
開發者ID:Dieterbe,項目名稱:ranger,代碼行數:20,代碼來源:environment.py

示例12: __init__

    def __init__(self, ui=None, bookmarks=None, tags=None, paths=['.']):
        """Initialize FM."""
        Actions.__init__(self)
        SignalDispatcher.__init__(self)
        if ui is None:
            self.ui = UI()
        else:
            self.ui = ui
        self.start_paths = paths
        self.directories = dict()
        self.log = deque(maxlen=20)
        self.image_displayer = ImageDisplayer()
        self.bookmarks = bookmarks
        self.current_tab = 1
        self.tabs = {}
        self.tags = tags
        self.restorable_tabs = deque([], ranger.MAX_RESTORABLE_TABS)
        self.py3 = sys.version_info >= (3, )
        self.previews = {}
        self.default_linemodes = deque()
        self.loader = Loader()
        self.copy_buffer = set()
        self.do_cut = False
        self.metadata = MetadataManager()

        try:
            self.username = pwd.getpwuid(os.geteuid()).pw_name
        except:
            self.username = 'uid:' + str(os.geteuid())
        self.hostname = socket.gethostname()
        self.home_path = os.path.expanduser('~')

        self.log.append('ranger {0} started! Process ID is {1}.' \
                .format(__version__, os.getpid()))
        self.log.append('Running on Python ' + sys.version.replace('\n',''))

        mimetypes.knownfiles.append(os.path.expanduser('~/.mime.types'))
        mimetypes.knownfiles.append(self.relpath('data/mime.types'))
        self.mimetypes = mimetypes.MimeTypes()
開發者ID:anekos,項目名稱:ranger,代碼行數:39,代碼來源:fm.py

示例13: __init__

 def __init__(self, path):
     SignalDispatcher.__init__(self)
     descr = "Waiting for dir '" + path + "' to be mounted"
     Loadable.__init__(self, self.generate(), descr)
     self.path = path
開發者ID:BlackSwann,項目名稱:dotfiles,代碼行數:5,代碼來源:commands.py

示例14: __init__

 def __init__(self, path):
     SignalDispatcher.__init__(self)
開發者ID:arwer13,項目名稱:ranger,代碼行數:2,代碼來源:environment.py


注:本文中的ranger.ext.signals.SignalDispatcher類示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。