##// END OF EJS Templates
hooks.py => core/hooks.py and updated imports.
Brian Granger -
Show More
@@ -2253,7 +2253,7 b' Currently the magic system has the following functions:\\n"""'
2253 2253
2254 2254 If you wish to write your own editor hook, you can put it in a
2255 2255 configuration file which you load at startup time. The default hook
2256 is defined in the IPython.hooks module, and you can use that as a
2256 is defined in the IPython.core.hooks module, and you can use that as a
2257 2257 starting example for further modifications. That file also has
2258 2258 general instructions on how to set a new hook for use once you've
2259 2259 defined it."""
1 NO CONTENT: file renamed from IPython/hooks.py to IPython/core/hooks.py
@@ -16,3 +16,11 b' def test_import_fakemodule():'
16 16 def test_import_excolors():
17 17 from IPython.core import excolors
18 18
19 def test_import_history():
20 from IPython.core import history
21
22 def test_import_hooks():
23 from IPython.core import hooks
24
25
26
@@ -626,7 +626,8 b' class InteractiveShell(object,Magic):'
626 626 self.strdispatchers = {}
627 627
628 628 # Set all default hooks, defined in the IPython.hooks module.
629 hooks = IPython.hooks
629 import IPython.core.hooks
630 hooks = IPython.core.hooks
630 631 for hook_name in hooks.__all__:
631 632 # default hooks have priority 100, i.e. low; user hooks should have
632 633 # 0-100 priority
@@ -1019,10 +1020,10 b' class InteractiveShell(object,Magic):'
1019 1020 return
1020 1021
1021 1022 dp = getattr(self.hooks, name, None)
1022 if name not in IPython.hooks.__all__:
1023 print "Warning! Hook '%s' is not one of %s" % (name, IPython.hooks.__all__ )
1023 if name not in IPython.core.hooks.__all__:
1024 print "Warning! Hook '%s' is not one of %s" % (name, IPython.core.hooks.__all__ )
1024 1025 if not dp:
1025 dp = IPython.hooks.CommandChainDispatcher()
1026 dp = IPython.core.hooks.CommandChainDispatcher()
1026 1027
1027 1028 try:
1028 1029 dp.add(f,priority)
@@ -5,8 +5,7 b''
5 5 import re
6 6
7 7 # Our own modules
8 from IPython.hooks import CommandChainDispatcher
9 import IPython.hooks
8 from IPython.core.hooks import CommandChainDispatcher
10 9
11 10 # Code begins
12 11 class StrDispatch(object):
@@ -131,6 +131,8 b' Where things will be moved'
131 131
132 132 * :file:`history.py`. Move to :file:`IPython.core`.
133 133
134 * :file:`hooks.py`. Move to :file:`IPython.core`.
135
134 136
135 137 * :file:`Itpl.py`. Remove. Version already in :file:`IPython.external`.
136 138
@@ -172,7 +174,7 b' Where things will be moved'
172 174
173 175
174 176
175 * :file:`hooks.py`. Move to :file:`IPython.core`.
177
176 178
177 179 * :file:`ipapi.py`. Move to :file:`IPython.core`.
178 180
General Comments 0
You need to be logged in to leave comments. Login now