##// END OF EJS Templates
add `ConsoleWidget.check_complete` flag...
add `ConsoleWidget.check_complete` flag disables input-parsing in the QtConsole, which is inappropriate for non-Python kernels. Disabling check_complete forces shift-enter to execute, just like the Notebook.

File last commit:

r11360:f3aabe2e
r11779:e3e99a13
Show More
embedded_terminal.py
30 lines | 794 B | text/x-python | PythonLexer
MinRK
add in-process kernel examples
r10305 import os
from IPython.kernel.inprocess import InProcessKernelManager
Martin Spacek
Fix `frontend` deprecation warnings in several examples
r11360 from IPython.terminal.console.interactiveshell import ZMQTerminalInteractiveShell
MinRK
add in-process kernel examples
r10305
def print_process_id():
print 'Process ID is:', os.getpid()
def main():
print_process_id()
# Create an in-process kernel
# >>> print_process_id()
# will print the same process ID as the main process
kernel_manager = InProcessKernelManager()
kernel_manager.start_kernel()
kernel = kernel_manager.kernel
kernel.gui = 'qt4'
kernel.shell.push({'foo': 43, 'print_process_id': print_process_id})
client = kernel_manager.client()
client.start_channels()
MinRK
fix in process qt and in process examples
r10333 shell = ZMQTerminalInteractiveShell(manager=kernel_manager, client=client)
MinRK
add in-process kernel examples
r10305 shell.mainloop()
if __name__ == '__main__':
main()