diff --git a/docs/source/interactive/python-ipython-diff.rst b/docs/source/interactive/python-ipython-diff.rst index 242429b..e05594c 100644 --- a/docs/source/interactive/python-ipython-diff.rst +++ b/docs/source/interactive/python-ipython-diff.rst @@ -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 @@ -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 @@ -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! diff --git a/docs/source/interactive/tutorial.rst b/docs/source/interactive/tutorial.rst index e1000e0..511e746 100644 --- a/docs/source/interactive/tutorial.rst +++ b/docs/source/interactive/tutorial.rst @@ -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]