Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Backport PR #13024 on branch 7.x (Documentation fixes) #13062

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
17 changes: 4 additions & 13 deletions docs/source/interactive/python-ipython-diff.rst
Expand Up @@ -46,9 +46,9 @@ All the following construct are valid IPython syntax:
.. code-block:: ipython

In [1]: my_files = !ls ~/
In [1]: for i,file in enumerate(my_file):
In [1]: for i, file in enumerate(my_files):
...: raw = !echo $file
...: !echo {files[0].upper()} $raw
...: !echo {file[0].upper()} $raw


.. code-block:: ipython
Expand Down Expand Up @@ -193,10 +193,9 @@ You can combine the different possibilities in for loops, condition, functions..
.. code-block:: ipython

my_files = !ls ~/
b = "backup file"
for i,file in enumerate(my_file):
for i, file in enumerate(my_files):
raw = !echo $backup $file
!cp $file {file.split('.')[0]+'.bak'}
!cp $file {file.split('.')[0] + '.bak'}


Magics
Expand Down Expand Up @@ -239,11 +238,3 @@ Magic with two percent sign can spread over multiple lines, but do not support a
devfs 190Ki 190Ki 0Bi 100% 656 0 100% /dev
map -hosts 0Bi 0Bi 0Bi 100% 0 0 100% /net
map auto_home 0Bi 0Bi 0Bi 100% 0 0 100% /hom


Combining it all
----------------

::

find a snippet that combine all that into one thing!
2 changes: 1 addition & 1 deletion docs/source/interactive/tutorial.rst
Expand Up @@ -90,7 +90,7 @@ completion also works on file and directory names.
Starting with IPython 6.0, if ``jedi`` is installed, IPython will try to pull
completions from Jedi as well. This allows to not only inspect currently
existing objects, but also to infer completion statically without executing
code. There is nothing particular need to get this to work, simply use tab
code. There is nothing particular needed to get this to work, simply use tab
completion on more complex expressions like the following::

>>> data = ['Number of users', 123456]
Expand Down