Show More
@@ -133,7 +133,8 b' from IPython.external import simplegeneric' | |||||
133 | from IPython.external import path |
|
133 | from IPython.external import path | |
134 |
|
134 | |||
135 | try: |
|
135 | try: | |
136 |
from IPython import genutils |
|
136 | from IPython import genutils | |
|
137 | from IPython.utils import generics | |||
137 | except ImportError: |
|
138 | except ImportError: | |
138 | genutils = None |
|
139 | genutils = None | |
139 | generics = None |
|
140 | generics = None |
@@ -22,6 +22,7 b' import shutil,os,shlex' | |||||
22 | from IPython.external import mglob |
|
22 | from IPython.external import mglob | |
23 | from IPython.external.path import path |
|
23 | from IPython.external.path import path | |
24 | from IPython.ipapi import UsageError |
|
24 | from IPython.ipapi import UsageError | |
|
25 | import IPython.utils.generics | |||
25 |
|
26 | |||
26 | def parse_args(args): |
|
27 | def parse_args(args): | |
27 | """ Given arg string 'CMD files... target', return ([files], target) """ |
|
28 | """ Given arg string 'CMD files... target', return ([files], target) """ | |
@@ -230,7 +231,7 b' def complete_pathobj(obj, prev_completions):' | |||||
230 | # just return normal attributes of 'path' object if the dir is empty |
|
231 | # just return normal attributes of 'path' object if the dir is empty | |
231 | raise IPython.ipapi.TryNext |
|
232 | raise IPython.ipapi.TryNext | |
232 |
|
233 | |||
233 | complete_pathobj = IPython.generics.complete_object.when_type(PathObj)(complete_pathobj) |
|
234 | complete_pathobj = IPython.utils.generics.complete_object.when_type(PathObj)(complete_pathobj) | |
234 |
|
235 | |||
235 | def test_pathobj(): |
|
236 | def test_pathobj(): | |
236 | #p = PathObj('c:/prj') |
|
237 | #p = PathObj('c:/prj') |
@@ -9,7 +9,8 b' only whitespace as completer delimiter. If this works well, we will' | |||||
9 | do the same in default completer. |
|
9 | do the same in default completer. | |
10 |
|
10 | |||
11 | """ |
|
11 | """ | |
12 |
from IPython import |
|
12 | from IPython import ipapi | |
|
13 | from IPython.utils import generics | |||
13 | from IPython.genutils import dir2 |
|
14 | from IPython.genutils import dir2 | |
14 |
|
15 | |||
15 | def attr_matches(self, text): |
|
16 | def attr_matches(self, text): |
@@ -52,7 +52,7 b' from IPython.ipstruct import Struct' | |||||
52 | from IPython.macro import Macro |
|
52 | from IPython.macro import Macro | |
53 | from IPython.genutils import * |
|
53 | from IPython.genutils import * | |
54 | from IPython import platutils |
|
54 | from IPython import platutils | |
55 | import IPython.generics |
|
55 | import IPython.utils.generics | |
56 | import IPython.ipapi |
|
56 | import IPython.ipapi | |
57 | from IPython.ipapi import UsageError |
|
57 | from IPython.ipapi import UsageError | |
58 | from IPython.testing import decorators as testdec |
|
58 | from IPython.testing import decorators as testdec | |
@@ -718,7 +718,7 b' Currently the magic system has the following functions:\\n"""' | |||||
718 |
|
718 | |||
719 | if info.found: |
|
719 | if info.found: | |
720 | try: |
|
720 | try: | |
721 | IPython.generics.inspect_object(info.obj) |
|
721 | IPython.utils.generics.inspect_object(info.obj) | |
722 | return |
|
722 | return | |
723 | except IPython.ipapi.TryNext: |
|
723 | except IPython.ipapi.TryNext: | |
724 | pass |
|
724 | pass |
@@ -26,6 +26,7 b' from IPython.external.Itpl import ItplNS' | |||||
26 | from IPython.ipapi import TryNext |
|
26 | from IPython.ipapi import TryNext | |
27 | from IPython.ipstruct import Struct |
|
27 | from IPython.ipstruct import Struct | |
28 | from IPython.macro import Macro |
|
28 | from IPython.macro import Macro | |
|
29 | import IPython.utils.generics | |||
29 |
|
30 | |||
30 | from IPython.genutils import * |
|
31 | from IPython.genutils import * | |
31 |
|
32 | |||
@@ -573,7 +574,7 b' class CachedOutput:' | |||||
573 | display, e.g. when your own objects need special formatting. |
|
574 | display, e.g. when your own objects need special formatting. | |
574 | """ |
|
575 | """ | |
575 | try: |
|
576 | try: | |
576 | return IPython.generics.result_display(arg) |
|
577 | return IPython.utils.generics.result_display(arg) | |
577 | except TryNext: |
|
578 | except TryNext: | |
578 | return self.shell.hooks.result_display(arg) |
|
579 | return self.shell.hooks.result_display(arg) | |
579 |
|
580 |
@@ -74,7 +74,7 b' import IPython.rlineimpl as readline' | |||||
74 | import itertools |
|
74 | import itertools | |
75 | from IPython.ipstruct import Struct |
|
75 | from IPython.ipstruct import Struct | |
76 | from IPython import ipapi |
|
76 | from IPython import ipapi | |
77 | from IPython import generics |
|
77 | from IPython.utils import generics | |
78 | import types |
|
78 | import types | |
79 |
|
79 | |||
80 | # Python 2.4 offers sets as a builtin |
|
80 | # Python 2.4 offers sets as a builtin |
@@ -49,7 +49,7 b' import IPython' | |||||
49 | from IPython.Itpl import Itpl,itpl,printpl |
|
49 | from IPython.Itpl import Itpl,itpl,printpl | |
50 | from IPython import platutils |
|
50 | from IPython import platutils | |
51 | from IPython.utils import DPyGetOpt |
|
51 | from IPython.utils import DPyGetOpt | |
52 | from IPython.generics import result_display |
|
52 | from IPython.utils.generics import result_display | |
53 | import IPython.ipapi |
|
53 | import IPython.ipapi | |
54 | from IPython.external.path import path |
|
54 | from IPython.external.path import path | |
55 | if os.name == "nt": |
|
55 | if os.name == "nt": |
@@ -31,6 +31,7 b' from IPython.utils import coloransi' | |||||
31 | from IPython import Release |
|
31 | from IPython import Release | |
32 | from IPython.ipapi import TryNext |
|
32 | from IPython.ipapi import TryNext | |
33 | from IPython.genutils import * |
|
33 | from IPython.genutils import * | |
|
34 | import IPython.utils.generics | |||
34 |
|
35 | |||
35 | #**************************************************************************** |
|
36 | #**************************************************************************** | |
36 | #Color schemes for Prompts. |
|
37 | #Color schemes for Prompts. | |
@@ -531,7 +532,7 b' class CachedOutput:' | |||||
531 | display, e.g. when your own objects need special formatting. |
|
532 | display, e.g. when your own objects need special formatting. | |
532 | """ |
|
533 | """ | |
533 | try: |
|
534 | try: | |
534 | return IPython.generics.result_display(arg) |
|
535 | return IPython.utils.generics.result_display(arg) | |
535 | except TryNext: |
|
536 | except TryNext: | |
536 | return self.shell.hooks.result_display(arg) |
|
537 | return self.shell.hooks.result_display(arg) | |
537 |
|
538 |
1 | NO CONTENT: file renamed from IPython/generics.py to IPython/utils/generics.py |
|
NO CONTENT: file renamed from IPython/generics.py to IPython/utils/generics.py |
@@ -7,3 +7,6 b' def test_import_coloransi():' | |||||
7 | def test_import_DPyGetOpt(): |
|
7 | def test_import_DPyGetOpt(): | |
8 | from IPython.utils import DPyGetOpt |
|
8 | from IPython.utils import DPyGetOpt | |
9 |
|
9 | |||
|
10 | def test_import_generics(): | |||
|
11 | from IPython.utils import generics | |||
|
12 |
@@ -107,8 +107,12 b' Where things will be moved' | |||||
107 |
|
107 | |||
108 | * :file:`dtutils.py`. Move to :file:`IPython.deathrow`. |
|
108 | * :file:`dtutils.py`. Move to :file:`IPython.deathrow`. | |
109 |
|
109 | |||
|
110 | * :file:`excolors.py`. Move to :file:`IPython.core` or :file:`IPython.config`. | |||
|
111 | Maybe move to :mod:`IPython.lib` or :mod:`IPython.python`? | |||
|
112 | ||||
110 | * :file:`FakeModule.py`. Move to :file:`IPython/core/fakemodule.py`. |
|
113 | * :file:`FakeModule.py`. Move to :file:`IPython/core/fakemodule.py`. | |
111 |
|
114 | |||
|
115 | * :file:`generics.py`. Move to :file:`IPython.python`. | |||
112 |
|
116 | |||
113 | * :file:`Extensions`. This needs to be gone through separately. Minimally, |
|
117 | * :file:`Extensions`. This needs to be gone through separately. Minimally, | |
114 | the package should be renamed to :file:`extensions`. |
|
118 | the package should be renamed to :file:`extensions`. | |
@@ -149,17 +153,10 b' Where things will be moved' | |||||
149 |
|
153 | |||
150 | * :file:`config`. Good where it is! |
|
154 | * :file:`config`. Good where it is! | |
151 |
|
155 | |||
152 |
|
||||
153 |
|
||||
154 |
|
||||
155 | * :file:`excolors.py`. Move to :file:`IPython.core` or :file:`IPython.config`. |
|
|||
156 | Maybe move to :mod:`IPython.lib` or :mod:`IPython.python`? |
|
|||
157 |
|
||||
158 | * :file:`external`. Good where it is! |
|
156 | * :file:`external`. Good where it is! | |
159 |
|
157 | |||
160 | * :file:`frontend`. Good where it is! |
|
158 | * :file:`frontend`. Good where it is! | |
161 |
|
159 | |||
162 | * :file:`generics.py`. Move to :file:`IPython.python`. |
|
|||
163 |
|
160 | |||
164 | * :file:`genutils.py`. Move to :file:`IPython.python` and break up into different |
|
161 | * :file:`genutils.py`. Move to :file:`IPython.python` and break up into different | |
165 | modules. |
|
162 | modules. |
General Comments 0
You need to be logged in to leave comments.
Login now