Show More
@@ -115,9 +115,6 b' def main():' | |||||
115 |
|
115 | |||
116 | ip.define_alias(key.replace('.',''), cmd) |
|
116 | ip.define_alias(key.replace('.',''), cmd) | |
117 |
|
117 | |||
118 | # mglob combines 'find', recursion, exclusion... '%mglob?' to learn more |
|
|||
119 | ip.load("IPython.external.mglob") |
|
|||
120 |
|
||||
121 | # win32 is crippled w/o cygwin, try to help it a little bit |
|
118 | # win32 is crippled w/o cygwin, try to help it a little bit | |
122 | if sys.platform == 'win32': |
|
119 | if sys.platform == 'win32': | |
123 | if 'cygwin' in os.environ['PATH'].lower(): |
|
120 | if 'cygwin' in os.environ['PATH'].lower(): |
@@ -13,6 +13,14 b" commands (that e.g. don't understand / as path separator). These can" | |||||
13 | do some useful tricks on their own, though (like use 'mglob' patterns). |
|
13 | do some useful tricks on their own, though (like use 'mglob' patterns). | |
14 |
|
14 | |||
15 | Not to be confused with ipipe commands (ils etc.) that also start with i. |
|
15 | Not to be confused with ipipe commands (ils etc.) that also start with i. | |
|
16 | ||||
|
17 | QUARANTINE, NEEDS UPDATING TO THE NEW IPYTHON API TO WORK | |||
|
18 | ||||
|
19 | this depends on mglob that used to be in externals, | |||
|
20 | if this code is updated to run again with current IPython, you may need to | |||
|
21 | reintroduce that file back. In doing so, look for the possibility of achieving | |||
|
22 | the same effect only with the standard library (which may have improved by now, | |||
|
23 | since we currently depend on Python 2.6). | |||
16 | """ |
|
24 | """ | |
17 |
|
25 | |||
18 | from IPython.core import ipapi |
|
26 | from IPython.core import ipapi | |
@@ -243,4 +251,4 b' def test_pathobj():' | |||||
243 | cwd = PathObj('.') |
|
251 | cwd = PathObj('.') | |
244 | ip.push("rootdir startmenu cwd") |
|
252 | ip.push("rootdir startmenu cwd") | |
245 |
|
253 | |||
246 | #test_pathobj() No newline at end of file |
|
254 | #test_pathobj() |
@@ -138,17 +138,6 b" If you want to store the alias so that it will always be available, do '%store p" | |||||
138 | Alias stored: psftp (0, 'c:\\opt\\PuTTY\\psftp.exe') |
|
138 | Alias stored: psftp (0, 'c:\\opt\\PuTTY\\psftp.exe') | |
139 | ... |
|
139 | ... | |
140 |
|
140 | |||
141 | mglob |
|
|||
142 | ----- |
|
|||
143 |
|
||||
144 | Provide the magic function %mglob, which makes it easier (than the 'find' command) to collect (possibly recursive) file lists. Examples:: |
|
|||
145 |
|
||||
146 | [c:/ipython]|9> mglob *.py |
|
|||
147 | [c:/ipython]|10> mglob *.py rec:*.txt |
|
|||
148 | [c:/ipython]|19> workfiles = %mglob !.svn/ !.hg/ !*_Data/ !*.bak rec:. |
|
|||
149 |
|
||||
150 | Note that the first 2 calls will put the file list in result history (_, _9, _10), and the last one will assign it to 'workfiles'. |
|
|||
151 |
|
||||
152 |
|
141 | |||
153 | Prompt customization |
|
142 | Prompt customization | |
154 | ==================== |
|
143 | ==================== |
1 | NO CONTENT: file was removed |
|
NO CONTENT: file was removed |
1 | NO CONTENT: file was removed |
|
NO CONTENT: file was removed |
General Comments 0
You need to be logged in to leave comments.
Login now