From 246e6becf1f5ebdc393d4f5ee573aa2fcf478f4e 2014-03-30 17:18:09 From: Brian E. Granger Date: 2014-03-30 17:18:09 Subject: [PATCH] Minor edits and updates. --- diff --git a/examples/Embedding/Examples/embed_class_long.py b/examples/Embedding/Examples/embed_class_long.py index f8cffe4..a8ee3d6 100755 --- a/examples/Embedding/Examples/embed_class_long.py +++ b/examples/Embedding/Examples/embed_class_long.py @@ -3,7 +3,7 @@ Please see the documentation in the IPython.Shell module for more details. -The accompanying file example-embed-short.py has quick code fragments for +The accompanying file embed_class_short.py has quick code fragments for embedding which you can cut and paste in your code once you understand how things work. @@ -133,5 +133,3 @@ print('\nMain program calling bar("spam")\n') bar('spam') print('Main program finished. Bye!') - -#********************** End of file *********************** diff --git a/examples/Embedding/Examples/embed_class_short.py b/examples/Embedding/Examples/embed_class_short.py index 96b3173..07cef1d 100644 --- a/examples/Embedding/Examples/embed_class_short.py +++ b/examples/Embedding/Examples/embed_class_short.py @@ -1,6 +1,6 @@ """Quick code snippets for embedding IPython into other programs. -See example-embed.py for full details, this file has the bare minimum code for +See embed_class_long.py for full details, this file has the bare minimum code for cut and paste use once you understand how to use the system.""" #--------------------------------------------------------------------------- @@ -20,7 +20,7 @@ from IPython.terminal.embed import InteractiveShellEmbed # Now create the IPython shell instance. Put ipshell() anywhere in your code # where you want it to open. ipshell = InteractiveShellEmbed(banner1=banner, exit_msg=exit_msg) - + #--------------------------------------------------------------------------- # This code will load an embeddable IPython shell always with no changes for # nested embededings. @@ -43,5 +43,3 @@ else: # Define a dummy ipshell() so the same code doesn't crash inside an # interactive IPython def ipshell(): pass - -#******************* End of file ******************** diff --git a/examples/Embedding/Examples/embed_function.py b/examples/Embedding/Examples/embed_function.py index cc9ff4e..915c259 100644 --- a/examples/Embedding/Examples/embed_function.py +++ b/examples/Embedding/Examples/embed_function.py @@ -1,5 +1,4 @@ -# This shows how to use the new top-level embed function. It is a simpler -# API that manages the creation of the embedded shell. +"""Embed IPython using the simple embed function rather than the class API.""" from IPython import embed