From 24cb7424820dea80f0709d4bc05eceac41c96436 2012-05-11 21:36:22 From: Matthias BUSSONNIER Date: 2012-05-11 21:36:22 Subject: [PATCH] remove references to loadpy remove most of the references to loadpy across the docs and example --- diff --git a/IPython/frontend/html/notebook/notebookmanager.py b/IPython/frontend/html/notebook/notebookmanager.py index 9acf0cd..a4f859b 100644 --- a/IPython/frontend/html/notebook/notebookmanager.py +++ b/IPython/frontend/html/notebook/notebookmanager.py @@ -41,7 +41,7 @@ class NotebookManager(LoggingConfigurable): save_script = Bool(False, config=True, help="""Automatically create a Python script when saving the notebook. - For easier use of import, %run and %loadpy across notebooks, a + For easier use of import, %run and %load across notebooks, a .py script will be created next to any .ipynb on each save. This can also be set with the short `--script` flag. diff --git a/IPython/frontend/qt/console/mainwindow.py b/IPython/frontend/qt/console/mainwindow.py index 8ee7e64..57b949c 100644 --- a/IPython/frontend/qt/console/mainwindow.py +++ b/IPython/frontend/qt/console/mainwindow.py @@ -597,7 +597,7 @@ class MainWindow(QtGui.QMainWindow): # list of protected magic that don't like to be called without argument # append '?' to the end to print the docstring when called from the menu - protected_magic = set(["more","less","load_ext","pycat","loadpy","save"]) + protected_magic = set(["more","less","load_ext","pycat","loadpy","load","save"]) magics=re.findall('\w+', listofmagic) for magic in magics: if magic in protected_magic: diff --git a/docs/examples/notebooks/00_notebook_tour.ipynb b/docs/examples/notebooks/00_notebook_tour.ipynb index 856b500..e77da54 100644 --- a/docs/examples/notebooks/00_notebook_tour.ipynb +++ b/docs/examples/notebooks/00_notebook_tour.ipynb @@ -1014,7 +1014,7 @@ "source": [ "# Loading external codes", "* Drag and drop a ``.py`` in the dashboard", - "* Use ``%loadpy`` with any local or remote url: [the Matplotlib Gallery!](http://matplotlib.sourceforge.net/gallery.html)", + "* Use ``%load`` with any local or remote url: [the Matplotlib Gallery!](http://matplotlib.sourceforge.net/gallery.html)", "", "In this notebook we've kept the output saved so you can see the result, but you should run the next", "cell yourself (with an active internet connection)." @@ -1024,7 +1024,7 @@ "cell_type": "code", "collapsed": true, "input": [ - "%loadpy http://matplotlib.sourceforge.net/mpl_examples/pylab_examples/integral_demo.py" + "%load http://matplotlib.sourceforge.net/mpl_examples/pylab_examples/integral_demo.py" ], "language": "python", "outputs": [], diff --git a/docs/examples/tests/heartbeat/hb_gil.py b/docs/examples/tests/heartbeat/hb_gil.py index 279a6ab..3f9aef1 100644 --- a/docs/examples/tests/heartbeat/hb_gil.py +++ b/docs/examples/tests/heartbeat/hb_gil.py @@ -1,7 +1,7 @@ """ Run this script in the qtconsole with one of: - %loadpy hb_gil.py + %load hb_gil.py or %run hb_gil.py diff --git a/docs/source/interactive/qtconsole.txt b/docs/source/interactive/qtconsole.txt index 6f65002..774b161 100644 --- a/docs/source/interactive/qtconsole.txt +++ b/docs/source/interactive/qtconsole.txt @@ -33,18 +33,18 @@ is not yet configurable. point in a multiline block, you can force its execution (without having to go to the bottom) with :kbd:`Shift-Enter`. -``%loadpy`` -=========== +``%load`` +========= -The new ``%loadpy`` magic takes any python script (must end in '.py'), and -pastes its contents as your next input, so you can edit it before -executing. The script may be on your machine, but you can also specify a url, -and it will download the script from the web. This is particularly useful for -playing with examples from documentation, such as matplotlib. +The new ``%load`` magic (previously ``%loadpy``) takes any script, and pastes +its contents as your next input, so you can edit it before executing. The +script may be on your machine, but you can also specify an history range, or a +url, and it will download the script from the web. This is particularly useful +for playing with examples from documentation, such as matplotlib. .. sourcecode:: ipython - In [6]: %loadpy http://matplotlib.sourceforge.net/plot_directive/mpl_examples/mplot3d/contour3d_demo.py + In [6]: %load http://matplotlib.sourceforge.net/plot_directive/mpl_examples/mplot3d/contour3d_demo.py In [7]: from mpl_toolkits.mplot3d import axes3d ...: import matplotlib.pyplot as plt