### Navigation

- index
- modules |
- next |
- previous |
- home|
- search|
- documentation »
- The IPython API »

# lib.inputhookpyglet

## Module: `lib.inputhookpyglet`

Enable pyglet to be used interacive by setting PyOS_InputHook.

### Authors

- Nicolas P. Rougier
- Fernando Perez

`IPython.lib.inputhookpyglet.``inputhook_pyglet`()

  Run the pyglet event loop by processing pending events only.

  This keeps processing pending events until stdin is ready. After processing all pending events, a call to time.sleep is inserted. This is needed, otherwise, CPU usage is at 100%. This sleep time should be tuned though for best performance.

### Navigation

- index
- modules |
- next |
- previous |
- home|
- search|
- documentation »
- The IPython API »