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