Show More
@@ -637,6 +637,7 the ``%sx`` magic command. | |||||
637 | The captured list has some convenience features. ``myfiles.n`` or ``myfiles.s`` |
|
637 | The captured list has some convenience features. ``myfiles.n`` or ``myfiles.s`` | |
638 | returns a string delimited by newlines or spaces, respectively. ``myfiles.p`` |
|
638 | returns a string delimited by newlines or spaces, respectively. ``myfiles.p`` | |
639 | produces `path objects <http://pypi.python.org/pypi/path.py>`_ from the list items. |
|
639 | produces `path objects <http://pypi.python.org/pypi/path.py>`_ from the list items. | |
|
640 | See :ref:`string_lists` for details. | |||
640 |
|
641 | |||
641 | IPython also allows you to expand the value of python variables when |
|
642 | IPython also allows you to expand the value of python variables when | |
642 | making system calls. Wrap variables or expressions in {braces}:: |
|
643 | making system calls. Wrap variables or expressions in {braces}:: |
@@ -43,12 +43,9 The 'sh' profile is different from the default profile in that: | |||||
43 | * Calling "up" does "cd .." |
|
43 | * Calling "up" does "cd .." | |
44 |
|
44 | |||
45 | The 'sh' profile is different from the now-obsolete (and unavailable) |
|
45 | The 'sh' profile is different from the now-obsolete (and unavailable) | |
46 | 'pysh' profile in that: |
|
46 | 'pysh' profile in that the ``$$var = command`` and ``$var = command`` syntax is | |
47 |
|
47 | not supported anymore. Use ``var = !command`` instead (which is available in all | ||
48 | * '$$var = command' and '$var = command' syntax is not supported |
|
48 | IPython profiles). | |
49 | * anymore. Use 'var = !command' instead (incidentally, this is |
|
|||
50 | * available in all IPython profiles). Note that !!command *will* |
|
|||
51 | * work. |
|
|||
52 |
|
49 | |||
53 | Aliases |
|
50 | Aliases | |
54 | ======= |
|
51 | ======= | |
@@ -162,7 +159,9 The sh profile uses the following prompt configurations:: | |||||
162 | o.prompt_in2= r'\C_Green|\C_LightGreen\D\C_Green>' |
|
159 | o.prompt_in2= r'\C_Green|\C_LightGreen\D\C_Green>' | |
163 |
|
160 | |||
164 | You can change the prompt configuration to your liking by editing |
|
161 | You can change the prompt configuration to your liking by editing | |
165 |
ipy |
|
162 | ipython_config.py. | |
|
163 | ||||
|
164 | .. _string_lists: | |||
166 |
|
165 | |||
167 | String lists |
|
166 | String lists | |
168 | ============ |
|
167 | ============ | |
@@ -254,7 +253,7 available:: | |||||
254 |
|
253 | |||
255 |
|
254 | |||
256 | Real world example: remove all files outside version control |
|
255 | Real world example: remove all files outside version control | |
257 | ============================================================ |
|
256 | ------------------------------------------------------------ | |
258 |
|
257 | |||
259 | First, capture output of "hg status":: |
|
258 | First, capture output of "hg status":: | |
260 |
|
259 | |||
@@ -283,12 +282,12 First, capture output of "hg status":: | |||||
283 | Now we can just remove these files by doing 'rm $junk.s'. |
|
282 | Now we can just remove these files by doing 'rm $junk.s'. | |
284 |
|
283 | |||
285 | The .s, .n, .p properties |
|
284 | The .s, .n, .p properties | |
286 | ========================= |
|
285 | ------------------------- | |
287 |
|
286 | |||
288 |
The |
|
287 | The ``.s`` property returns one string where lines are separated by | |
289 |
single space (for convenient passing to system commands). The |
|
288 | single space (for convenient passing to system commands). The ``.n`` | |
290 |
property return one string where the lines are separated by |
|
289 | property return one string where the lines are separated by a newline | |
291 | (i.e. the original output of the function). If the items in string |
|
290 | (i.e. the original output of the function). If the items in string | |
292 |
list are file names, |
|
291 | list are file names, ``.p`` can be used to get a list of "path" objects | |
293 | for convenient file manipulation. |
|
292 | for convenient file manipulation. | |
294 |
|
293 |
General Comments 0
You need to be logged in to leave comments.
Login now