Lines Matching refs:fileobj

21 def _fileobj_to_fd(fileobj):  argument
33 if isinstance(fileobj, int):
34 fd = fileobj
37 fd = int(fileobj.fileno())
40 "{!r}".format(fileobj)) from None
54 SelectorKey.fileobj.__doc__ = 'File object registered.'
69 def __getitem__(self, fileobj): argument
71 fd = self._selector._fileobj_lookup(fileobj)
74 raise KeyError("{!r} is not registered".format(fileobj)) from None
96 def register(self, fileobj, events, data=None): argument
119 def unregister(self, fileobj): argument
137 def modify(self, fileobj, events, data=None): argument
151 self.unregister(fileobj)
152 return self.register(fileobj, events, data)
180 def get_key(self, fileobj): argument
190 return mapping[fileobj]
192 raise KeyError("{!r} is not registered".format(fileobj)) from None
215 def _fileobj_lookup(self, fileobj): argument
225 return _fileobj_to_fd(fileobj)
229 if key.fileobj is fileobj:
234 def register(self, fileobj, events, data=None): argument
238 key = SelectorKey(fileobj, self._fileobj_lookup(fileobj), events, data)
242 .format(fileobj, key.fd))
247 def unregister(self, fileobj): argument
249 key = self._fd_to_key.pop(self._fileobj_lookup(fileobj))
251 raise KeyError("{!r} is not registered".format(fileobj)) from None
254 def modify(self, fileobj, events, data=None): argument
256 key = self._fd_to_key[self._fileobj_lookup(fileobj)]
258 raise KeyError("{!r} is not registered".format(fileobj)) from None
260 self.unregister(fileobj)
261 key = self.register(fileobj, events, data)
298 def register(self, fileobj, events, data=None): argument
299 key = super().register(fileobj, events, data)
306 def unregister(self, fileobj): argument
307 key = super().unregister(fileobj)
351 def register(self, fileobj, events, data=None): argument
352 key = super().register(fileobj, events, data)
361 super().unregister(fileobj)
365 def unregister(self, fileobj): argument
366 key = super().unregister(fileobj)
375 def modify(self, fileobj, events, data=None): argument
377 key = self._fd_to_key[self._fileobj_lookup(fileobj)]
391 super().unregister(fileobj)
516 def register(self, fileobj, events, data=None): argument
517 key = super().register(fileobj, events, data)
528 super().unregister(fileobj)
532 def unregister(self, fileobj): argument
533 key = super().unregister(fileobj)