##// END OF EJS Templates
Fix ultratb when there are non-ascii filenames present in a traceback...
Fix ultratb when there are non-ascii filenames present in a traceback This solves the simple problem of running a file with non-ascii chars in its name that contains an error of any kind in it.

File last commit:

r16113:87737521
r19858:31b4e819
Show More
inprocess_terminal.py
31 lines | 833 B | text/x-python | PythonLexer
from __future__ import print_function
import os
from IPython.kernel.inprocess import InProcessKernelManager
from IPython.terminal.console.interactiveshell import ZMQTerminalInteractiveShell
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()
shell = ZMQTerminalInteractiveShell(manager=kernel_manager, client=client)
shell.mainloop()
if __name__ == '__main__':
main()