Show More
@@ -3,7 +3,7 b'' | |||||
3 |
|
3 | |||
4 | Please see the documentation in the IPython.Shell module for more details. |
|
4 | Please see the documentation in the IPython.Shell module for more details. | |
5 |
|
5 | |||
6 |
The accompanying file e |
|
6 | The accompanying file embed_class_short.py has quick code fragments for | |
7 | embedding which you can cut and paste in your code once you understand how |
|
7 | embedding which you can cut and paste in your code once you understand how | |
8 | things work. |
|
8 | things work. | |
9 |
|
9 | |||
@@ -133,5 +133,3 b' print(\'\\nMain program calling bar("spam")\\n\')' | |||||
133 | bar('spam') |
|
133 | bar('spam') | |
134 |
|
134 | |||
135 | print('Main program finished. Bye!') |
|
135 | print('Main program finished. Bye!') | |
136 |
|
||||
137 | #********************** End of file <example-embed.py> *********************** |
|
@@ -1,6 +1,6 b'' | |||||
1 | """Quick code snippets for embedding IPython into other programs. |
|
1 | """Quick code snippets for embedding IPython into other programs. | |
2 |
|
2 | |||
3 |
See e |
|
3 | See embed_class_long.py for full details, this file has the bare minimum code for | |
4 | cut and paste use once you understand how to use the system.""" |
|
4 | cut and paste use once you understand how to use the system.""" | |
5 |
|
5 | |||
6 | #--------------------------------------------------------------------------- |
|
6 | #--------------------------------------------------------------------------- | |
@@ -20,7 +20,7 b' 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) | |
23 |
|
23 | |||
24 | #--------------------------------------------------------------------------- |
|
24 | #--------------------------------------------------------------------------- | |
25 | # This code will load an embeddable IPython shell always with no changes for |
|
25 | # This code will load an embeddable IPython shell always with no changes for | |
26 | # nested embededings. |
|
26 | # nested embededings. | |
@@ -43,5 +43,3 b' else:' | |||||
43 | # Define a dummy ipshell() so the same code doesn't crash inside an |
|
43 | # Define a dummy ipshell() so the same code doesn't crash inside an | |
44 | # interactive IPython |
|
44 | # interactive IPython | |
45 | def ipshell(): pass |
|
45 | def ipshell(): pass | |
46 |
|
||||
47 | #******************* End of file <example-embed-short.py> ******************** |
|
General Comments 0
You need to be logged in to leave comments.
Login now