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