##// END OF EJS Templates
Merge pull request #13024 from aadcg/master...
Blazej Michalik -
r26659:b2605dd3 merge
parent child
Show More
@@ -46,9 +46,9 All the following constructs are valid IPython syntax:
46 .. code-block:: ipython
46 .. code-block:: ipython
47
47
48 In [1]: my_files = !ls ~/
48 In [1]: my_files = !ls ~/
49 In [1]: for i,file in enumerate(my_file):
49 In [1]: for i, file in enumerate(my_files):
50 ...: raw = !echo $file
50 ...: raw = !echo $file
51 ...: !echo {files[0].upper()} $raw
51 ...: !echo {file[0].upper()} $raw
52
52
53
53
54 .. code-block:: ipython
54 .. code-block:: ipython
@@ -193,10 +193,9 You can combine the different possibilities in for loops, conditions, functions.
193 .. code-block:: ipython
193 .. code-block:: ipython
194
194
195 my_files = !ls ~/
195 my_files = !ls ~/
196 b = "backup file"
196 for i, file in enumerate(my_files):
197 for i,file in enumerate(my_file):
198 raw = !echo $backup $file
197 raw = !echo $backup $file
199 !cp $file {file.split('.')[0]+'.bak'}
198 !cp $file {file.split('.')[0] + '.bak'}
200
199
201
200
202 Magics
201 Magics
@@ -239,11 +238,3 Magics with double percent signs (``%%``) can spread over multiple lines, but th
239 devfs 190Ki 190Ki 0Bi 100% 656 0 100% /dev
238 devfs 190Ki 190Ki 0Bi 100% 656 0 100% /dev
240 map -hosts 0Bi 0Bi 0Bi 100% 0 0 100% /net
239 map -hosts 0Bi 0Bi 0Bi 100% 0 0 100% /net
241 map auto_home 0Bi 0Bi 0Bi 100% 0 0 100% /hom
240 map auto_home 0Bi 0Bi 0Bi 100% 0 0 100% /hom
242
243
244 Combining it all
245 ----------------
246
247 ::
248
249 find a snippet that combine all that into one thing!
@@ -90,7 +90,7 completion also works on file and directory names.
90 Starting with IPython 6.0, if ``jedi`` is installed, IPython will try to pull
90 Starting with IPython 6.0, if ``jedi`` is installed, IPython will try to pull
91 completions from Jedi as well. This allows to not only inspect currently
91 completions from Jedi as well. This allows to not only inspect currently
92 existing objects, but also to infer completion statically without executing
92 existing objects, but also to infer completion statically without executing
93 code. There is nothing particular need to get this to work, simply use tab
93 code. There is nothing particular needed to get this to work, simply use tab
94 completion on more complex expressions like the following::
94 completion on more complex expressions like the following::
95
95
96 >>> data = ['Number of users', 123456]
96 >>> data = ['Number of users', 123456]
General Comments 0
You need to be logged in to leave comments. Login now