Show More
@@ -2135,6 +2135,28 b' class InteractiveShell(Configurable, Magic):' | |||||
2135 | cell : str |
|
2135 | cell : str | |
2136 | A single or multiline string. |
|
2136 | A single or multiline string. | |
2137 | """ |
|
2137 | """ | |
|
2138 | ################################################################# | |||
|
2139 | # FIXME | |||
|
2140 | # ===== | |||
|
2141 | # This execution logic should stop calling runlines altogether, and | |||
|
2142 | # instead we should do what runlines does, in a controlled manner, here | |||
|
2143 | # (runlines mutates lots of state as it goes calling sub-methods that | |||
|
2144 | # also mutate state). Basically we should: | |||
|
2145 | # - apply dynamic transforms for single-line input (the ones that | |||
|
2146 | # split_blocks won't apply since they need context). | |||
|
2147 | # - increment the global execution counter (we need to pull that out | |||
|
2148 | # from outputcache's control; outputcache should instead read it from | |||
|
2149 | # the main object). | |||
|
2150 | # - do any logging of input | |||
|
2151 | # - update histories (raw/translated) | |||
|
2152 | # - then, call plain runsource (for single blocks, so displayhook is | |||
|
2153 | # triggered) or runcode (for multiline blocks in exec mode). | |||
|
2154 | # | |||
|
2155 | # Once this is done, we'll be able to stop using runlines and we'll | |||
|
2156 | # also have a much cleaner separation of logging, input history and | |||
|
2157 | # output cache management. | |||
|
2158 | ################################################################# | |||
|
2159 | ||||
2138 | # We need to break up the input into executable blocks that can be run |
|
2160 | # We need to break up the input into executable blocks that can be run | |
2139 | # in 'single' mode, to provide comfortable user behavior. |
|
2161 | # in 'single' mode, to provide comfortable user behavior. | |
2140 | blocks = self.input_splitter.split_blocks(cell) |
|
2162 | blocks = self.input_splitter.split_blocks(cell) |
General Comments 0
You need to be logged in to leave comments.
Login now