##// END OF EJS Templates
Merge pull request #1851 from Carreau/newcomp_rebase...
Merge pull request #1851 from Carreau/newcomp_rebase New completer for qtconsole with rich keyboard navigation during completion search. add a completer to the qtconsole that is navigable by arrows keys and tab. One need to call it twice to get it on focus and be able to select completion with Return. looks like zsh completer, not the gui drop down list of --gui-completer. This also try to split the completion logic from console_widget, and try to keep the old completer qui around. The plain completer that never takes focus back, and the QlistWidget completer. To switch between the 3, the --gui-completion flag as been changed to take an argument (plain, droplist, ncurses): ipython qtconsole --gui-completion=ncurses

File last commit:

r5885:cf991e07
r7395:45d28c54 merge
Show More
gilsleep.ipynb
55 lines | 1.3 KiB | text/plain | TextLexer
MinRK
add test notebook and script for #1260 (GIL-related heartbeat failures)...
r5885 {
"metadata": {
"name": "gilsleep"
},
"nbformat": 2,
"worksheets": [
{
"cells": [
{
"cell_type": "markdown",
"source": [
"Holding the GIL for too long could disrupt the heartbeat due to non-copying sends.",
"",
"The following cell repeatedly calls a function that holds the GIL for five seconds.",
"",
"The heartbeat will fail after a few iterations prior to fixing Issue [#1260](https://github.com/ipython/ipython/issues/1260)."
]
},
{
"cell_type": "code",
"collapsed": false,
"input": [
"import sys",
"import time",
"",
"from cython import inline",
"",
"def gilsleep(t):",
" \"\"\"gil-holding sleep with cython.inline\"\"\"",
" code = '\\n'.join([",
" 'from posix cimport unistd',",
" 'unistd.sleep(t)',",
" ])",
" while True:",
" inline(code, quiet=True, t=t)",
" print time.time()",
" sys.stdout.flush() # this is important",
"",
"gilsleep(5)"
],
"language": "python",
"outputs": [],
"prompt_number": 1
},
{
"cell_type": "code",
"collapsed": true,
"input": [],
"language": "python",
"outputs": [],
"prompt_number": " "
}
]
}
]
}