##// END OF EJS Templates
Pass tempfile_suffix argument to PromptSession....
Pass tempfile_suffix argument to PromptSession. This ensures that when the open_in_editor() method of the current buffer (a prompt_toolkit.buffer.Buffer) is called, the tempfile opened in the editor will always have a .py extension, to support editor syntax highlighting. The open_input_in_editor(event) function associated with the f2 keybinding manually sets the tempfile_suffix property of the current buffer before calling its open_in_editor() method. The vi keybinding (v) and emacs mode keybinding (c-x c-e) are handled by prompt_toolkit directly, bypassing this function, so the tempfile created when they are used is a .txt file. Passing the tempfile_suffix argument to the PrompSession constructor ensures that .py extension is always used.

File last commit:

r25387:50afc884
r25566:5d39b579
Show More
magics.rst
23 lines | 939 B | text/x-rst | RstLexer
Thomas Kluyver
Generate documentation of line & cell magics
r18294 =======================
Built-in magic commands
=======================
Matthias Bussonnier
One more pass on the docs....
r22598 .. note::
Carol Willing
Edits to magics doc
r22601 To Jupyter users: Magics are specific to and provided by the IPython kernel.
hongshaoyang
Minor edits to magics doc
r24592 Whether Magics are available on a kernel is a decision that is made by
Carol Willing
Edits to magics doc
r22601 the kernel developer on a per-kernel basis. To work properly, Magics must
use a syntax element which is not valid in the underlying language. For
hongshaoyang
Minor edits to magics doc
r24592 example, the IPython kernel uses the `%` syntax element for Magics as `%`
is not a valid unary operator in Python. However, `%` might have meaning in
other languages.
Matthias Bussonnier
One more pass on the docs....
r22598
hongshaoyang
Minor edits to magics doc
r24592 Here is the help auto-generated from the docstrings of all the available Magics
Danny Hermes
Fix small typos: an -> and and function -> functions
r25387 functions that IPython ships with.
Matthias Bussonnier
One more pass on the docs....
r22598
Danny Hermes
Fix small typos: an -> and and function -> functions
r25387 You can create and register your own Magics with IPython. You can find many user
hongshaoyang
Minor edits to magics doc
r24592 defined Magics on `PyPI <https://pypi.io>`_. Feel free to publish your own and
Matthias Bussonnier
One more pass on the docs....
r22598 use the ``Framework :: IPython`` trove classifier.
Thomas Kluyver
Generate documentation of line & cell magics
r18294 .. include:: magics-generated.txt