Show More
@@ -210,17 +210,23 b' def main():' | |||
|
210 | 210 | |
|
211 | 211 | print "\n".join(expand(sys.argv[1:])), |
|
212 | 212 | |
|
213 | def mglob_f(self, arg): | |
|
213 | ||
|
214 | def mglob(self, arg): | |
|
214 | 215 | from IPython.utils.text import SList |
|
215 | 216 | if arg.strip(): |
|
216 | 217 | return SList(expand(arg)) |
|
217 | 218 | print "Please specify pattern!" |
|
218 | 219 | print globsyntax |
|
219 | 220 | |
|
221 | ||
|
222 | mglob.__doc__ = globsyntax | |
|
223 | ||
|
224 | ||
|
220 | 225 | def init_ipython(ip): |
|
221 | 226 | """ register %mglob for IPython """ |
|
222 | mglob_f.__doc__ = globsyntax | |
|
223 |
ip. |
|
|
227 | ||
|
228 | ip.function_as_magic(mglob) | |
|
229 | ||
|
224 | 230 | |
|
225 | 231 | # test() |
|
226 | 232 | if __name__ == "__main__": |
General Comments 0
You need to be logged in to leave comments.
Login now