Forwards events to the corresponding instance of your event handler for this process. If you subclass L{EventSift} and reimplement this method, no event will be forwarded at all unless you call the superclass implementation. If your filtering is based on th
(self, event)
| 1635 | return super(EventSift, self).__call__(event) |
| 1636 | |
| 1637 | def event(self, event): |
| 1638 | """ |
| 1639 | Forwards events to the corresponding instance of your event handler |
| 1640 | for this process. |
| 1641 | |
| 1642 | If you subclass L{EventSift} and reimplement this method, no event |
| 1643 | will be forwarded at all unless you call the superclass implementation. |
| 1644 | |
| 1645 | If your filtering is based on the event type, there's a much easier way |
| 1646 | to do it: just implement a handler for it. |
| 1647 | """ |
| 1648 | eventCode = event.get_event_code() |
| 1649 | pid = event.get_pid() |
| 1650 | handler = self.forward.get(pid, None) |
| 1651 | if handler is None: |
| 1652 | handler = self.cls(*self.argv, **self.argd) |
| 1653 | if eventCode != win32.EXIT_PROCESS_DEBUG_EVENT: |
| 1654 | self.forward[pid] = handler |
| 1655 | elif eventCode == win32.EXIT_PROCESS_DEBUG_EVENT: |
| 1656 | del self.forward[pid] |
| 1657 | return handler(event) |
| 1658 | |
| 1659 | |
| 1660 | # ============================================================================== |
nothing calls this directly
no test coverage detected