Show More
@@ -20,7 +20,7 b' ip = IPython.ipapi.get()' | |||||
20 |
|
20 | |||
21 | import shutil,os,shlex |
|
21 | import shutil,os,shlex | |
22 | from IPython.external import mglob |
|
22 | from IPython.external import mglob | |
23 |
from IPython. |
|
23 | from IPython.external.path import path | |
24 | from IPython.ipapi import UsageError |
|
24 | from IPython.ipapi import UsageError | |
25 |
|
25 | |||
26 | def parse_args(args): |
|
26 | def parse_args(args): | |
@@ -138,7 +138,7 b' def collect(ip,arg):' | |||||
138 |
|
138 | |||
139 | Without args, try to open ~/_ipython/collect dir (in win32 at least). |
|
139 | Without args, try to open ~/_ipython/collect dir (in win32 at least). | |
140 | """ |
|
140 | """ | |
141 | from path import path |
|
141 | from IPython.external.path import path | |
142 | basedir = path(ip.options.ipythondir + '/collect') |
|
142 | basedir = path(ip.options.ipythondir + '/collect') | |
143 | try: |
|
143 | try: | |
144 | fs = mglob.expand(arg.split(None,1)[1]) |
|
144 | fs = mglob.expand(arg.split(None,1)[1]) |
@@ -25,7 +25,7 b' def main():' | |||||
25 | # Jason Orendorff's path class is handy to have in user namespace |
|
25 | # Jason Orendorff's path class is handy to have in user namespace | |
26 | # if you are doing shell-like stuff |
|
26 | # if you are doing shell-like stuff | |
27 | try: |
|
27 | try: | |
28 | ip.ex("from path import path" ) |
|
28 | ip.ex("from IPython.external.path import path" ) | |
29 | except ImportError: |
|
29 | except ImportError: | |
30 | pass |
|
30 | pass | |
31 |
|
31 |
@@ -33,7 +33,7 b' License: MIT open source license.' | |||||
33 |
|
33 | |||
34 | """ |
|
34 | """ | |
35 |
|
35 | |||
36 | from path import path as Path |
|
36 | from IPython.external.path import path as Path | |
37 | import os,stat,time |
|
37 | import os,stat,time | |
38 | import cPickle as pickle |
|
38 | import cPickle as pickle | |
39 | import UserDict |
|
39 | import UserDict |
@@ -5,7 +5,7 b' General purpose utilities.' | |||||
5 | This is a grab-bag of stuff I find useful in most programs I write. Some of |
|
5 | This is a grab-bag of stuff I find useful in most programs I write. Some of | |
6 | these things are also convenient when working at the command line. |
|
6 | these things are also convenient when working at the command line. | |
7 |
|
7 | |||
8 |
$Id: genutils.py 29 |
|
8 | $Id: genutils.py 2998 2008-01-31 10:06:04Z vivainio $""" | |
9 |
|
9 | |||
10 | #***************************************************************************** |
|
10 | #***************************************************************************** | |
11 | # Copyright (C) 2001-2006 Fernando Perez. <fperez@colorado.edu> |
|
11 | # Copyright (C) 2001-2006 Fernando Perez. <fperez@colorado.edu> | |
@@ -39,7 +39,7 b' from IPython.Itpl import Itpl,itpl,printpl' | |||||
39 | from IPython import DPyGetOpt, platutils |
|
39 | from IPython import DPyGetOpt, platutils | |
40 | from IPython.generics import result_display |
|
40 | from IPython.generics import result_display | |
41 | import IPython.ipapi |
|
41 | import IPython.ipapi | |
42 | from path import path |
|
42 | from IPython.external.path import path | |
43 | if os.name == "nt": |
|
43 | if os.name == "nt": | |
44 | from IPython.winconsole import get_console_size |
|
44 | from IPython.winconsole import get_console_size | |
45 |
|
45 |
@@ -32,7 +32,7 b" ip.set_hook('editor', calljed)" | |||||
32 | You can then enable the functionality by doing 'import myiphooks' |
|
32 | You can then enable the functionality by doing 'import myiphooks' | |
33 | somewhere in your configuration files or ipython command line. |
|
33 | somewhere in your configuration files or ipython command line. | |
34 |
|
34 | |||
35 |
$Id: hooks.py 29 |
|
35 | $Id: hooks.py 2998 2008-01-31 10:06:04Z vivainio $""" | |
36 |
|
36 | |||
37 | #***************************************************************************** |
|
37 | #***************************************************************************** | |
38 | # Copyright (C) 2005 Fernando Perez. <fperez@colorado.edu> |
|
38 | # Copyright (C) 2005 Fernando Perez. <fperez@colorado.edu> | |
@@ -222,10 +222,16 b' def shell_hook(self,cmd):' | |||||
222 |
|
222 | |||
223 | shell(cmd, header=self.rc.system_header, verbose=self.rc.system_verbose) |
|
223 | shell(cmd, header=self.rc.system_header, verbose=self.rc.system_verbose) | |
224 |
|
224 | |||
225 |
|
||||
226 | def show_in_pager(self,s): |
|
225 | def show_in_pager(self,s): | |
227 | """ Run a string through pager """ |
|
226 | """ Run a string through pager """ | |
228 | # raising TryNext here will use the default paging functionality |
|
227 | # raising TryNext here will use the default paging functionality | |
229 | raise ipapi.TryNext |
|
228 | raise ipapi.TryNext | |
|
229 | ||||
|
230 | def pre_command_hook(self,cmd): | |||
|
231 | """" Executed before starting to execute a command """ | |||
|
232 | return None | |||
|
233 | ||||
|
234 | def post_command_hook(self,cmd): | |||
|
235 | """ Executed after executing a command """ | |||
230 |
|
236 | |||
231 |
|
237 |
@@ -7,12 +7,9 b' new and unedited files.' | |||||
7 | To be used by "upgrade" feature. |
|
7 | To be used by "upgrade" feature. | |
8 | """ |
|
8 | """ | |
9 | try: |
|
9 | try: | |
10 |
from IPython. |
|
10 | from IPython.external.path import path | |
11 | except ImportError: |
|
11 | except ImportError: | |
12 | try: |
|
12 | from path import path | |
13 | from Extensions.path import path |
|
|||
14 | except ImportError: |
|
|||
15 | from path import path |
|
|||
16 |
|
13 | |||
17 | import md5,pickle |
|
14 | import md5,pickle | |
18 |
|
15 |
@@ -5,7 +5,7 b' or through ipython command line "ipython runtests.py".' | |||||
5 |
|
5 | |||
6 | """ |
|
6 | """ | |
7 |
|
7 | |||
8 | from path import path |
|
8 | from IPython.external.path import path | |
9 | import pprint,os |
|
9 | import pprint,os | |
10 | import IPython.ipapi |
|
10 | import IPython.ipapi | |
11 | ip = IPython.ipapi.get() |
|
11 | ip = IPython.ipapi.get() | |
@@ -28,4 +28,4 b' def main():' | |||||
28 | os.chdir(startdir) |
|
28 | os.chdir(startdir) | |
29 | pprint.pprint(results) |
|
29 | pprint.pprint(results) | |
30 |
|
30 | |||
31 | main() No newline at end of file |
|
31 | main() |
General Comments 0
You need to be logged in to leave comments.
Login now