##// END OF EJS Templates
Fix `frontend` deprecation warnings in several examples
Martin Spacek -
Show More
@@ -6,8 +6,8 b' kernel, both directly and via the frontend widget.'
6 """
6 """
7
7
8 from IPython.kernel.inprocess.ipkernel import InProcessKernel
8 from IPython.kernel.inprocess.ipkernel import InProcessKernel
9 from IPython.frontend.qt.console.rich_ipython_widget import RichIPythonWidget
9 from IPython.qt.console.rich_ipython_widget import RichIPythonWidget
10 from IPython.frontend.qt.inprocess_kernelmanager import QtInProcessKernelManager
10 from IPython.qt.inprocess_kernelmanager import QtInProcessKernelManager
11 from IPython.lib import guisupport
11 from IPython.lib import guisupport
12
12
13
13
@@ -16,7 +16,7 b' else:'
16 exit_msg = '*** Back in main IPython ***'
16 exit_msg = '*** Back in main IPython ***'
17
17
18 # First import the embed function
18 # First import the embed function
19 from IPython.frontend.terminal.embed import InteractiveShellEmbed
19 from IPython.terminal.embed import InteractiveShellEmbed
20 # Now create the IPython shell instance. Put ipshell() anywhere in your code
20 # Now create the IPython shell instance. Put ipshell() anywhere in your code
21 # where you want it to open.
21 # where you want it to open.
22 ipshell = InteractiveShellEmbed(banner1=banner, exit_msg=exit_msg)
22 ipshell = InteractiveShellEmbed(banner1=banner, exit_msg=exit_msg)
@@ -36,7 +36,7 b' from IPython import embed'
36 try:
36 try:
37 get_ipython
37 get_ipython
38 except NameError:
38 except NameError:
39 from IPython.frontend.terminal.embed import InteractiveShellEmbed
39 from IPython.terminal.embed import InteractiveShellEmbed
40 ipshell = InteractiveShellEmbed()
40 ipshell = InteractiveShellEmbed()
41 # Now ipshell() will open IPython anywhere in the code
41 # Now ipshell() will open IPython anywhere in the code
42 else:
42 else:
@@ -35,7 +35,7 b' else:'
35 nested = 1
35 nested = 1
36
36
37 # First import the embeddable shell class
37 # First import the embeddable shell class
38 from IPython.frontend.terminal.embed import InteractiveShellEmbed
38 from IPython.terminal.embed import InteractiveShellEmbed
39
39
40 # Now create an instance of the embeddable shell. The first argument is a
40 # Now create an instance of the embeddable shell. The first argument is a
41 # string with options exactly as you would type them if you were starting
41 # string with options exactly as you would type them if you were starting
@@ -1,7 +1,7 b''
1 import os
1 import os
2
2
3 from IPython.frontend.qt.console.rich_ipython_widget import RichIPythonWidget
3 from IPython.qt.console.rich_ipython_widget import RichIPythonWidget
4 from IPython.frontend.qt.inprocess import QtInProcessKernelManager
4 from IPython.qt.inprocess import QtInProcessKernelManager
5 from IPython.lib import guisupport
5 from IPython.lib import guisupport
6
6
7
7
@@ -1,7 +1,7 b''
1 import os
1 import os
2
2
3 from IPython.kernel.inprocess import InProcessKernelManager
3 from IPython.kernel.inprocess import InProcessKernelManager
4 from IPython.frontend.terminal.console.interactiveshell import ZMQTerminalInteractiveShell
4 from IPython.terminal.console.interactiveshell import ZMQTerminalInteractiveShell
5
5
6
6
7 def print_process_id():
7 def print_process_id():
@@ -1,6 +1,6 b''
1 """This tests passing local_ns and global_ns (for backwards compatibility only)
1 """This tests passing local_ns and global_ns (for backwards compatibility only)
2 at activation of an embedded shell."""
2 at activation of an embedded shell."""
3 from IPython.frontend.terminal.embed import InteractiveShellEmbed
3 from IPython.terminal.embed import InteractiveShellEmbed
4
4
5 user_ns = dict(cookie='monster')
5 user_ns = dict(cookie='monster')
6 ISE = InteractiveShellEmbed(banner1='check cookie in locals, and globals empty')
6 ISE = InteractiveShellEmbed(banner1='check cookie in locals, and globals empty')
General Comments 0
You need to be logged in to leave comments. Login now