Guest User

Untitled

a guest
Sep 5th, 2019
97
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.92 KB | None | 0 0
  1. def __init__(self, space, *args):
  2. "NOT_RPYTHON"
  3. from pypy.module.signal import interp_signal
  4. MixedModule.__init__(self, space, *args)
  5. # add the signal-checking callback as an action on the space
  6. space.check_signal_action = interp_signal.CheckSignalAction(space)
  7. space.actionflag.register_periodic_action(space.check_signal_action,
  8. use_bytecode_counter=False)
  9. if space.reverse_debugging:
  10. from pypy.interpreter.reverse_debugging import RDBSignalActionFlag
  11. space.actionflag.__class__ = RDBSignalActionFlag
  12. else:
  13. space.actionflag.__class__ = interp_signal.SignalActionFlag
  14. # xxx yes I know the previous line is a hack
  15. print "loading module"
  16. if os.name == "nt":
  17. print "creating sigint event"
  18. interp_signal.create_sigint_event()
Add Comment
Please, Sign In to add comment