Show More
@@ -173,20 +173,14 b' def get_input_encoding():' | |||||
173 | #----------------------------------------------------------------------------- |
|
173 | #----------------------------------------------------------------------------- | |
174 |
|
174 | |||
175 | class InputSplitter(object): |
|
175 | class InputSplitter(object): | |
176 |
"""An object that can |
|
176 | """An object that can accumulate lines of Python source before execution. | |
177 |
|
177 | |||
178 |
This object is designed to be |
|
178 | This object is designed to be fed python source line-by-line, using | |
179 |
|
179 | :meth:`push`. It will return on each push whether the currently pushed | ||
180 | 1. By feeding it python source line-by-line, using :meth:`push`. In this |
|
180 | code could be executed already. In addition, it provides a method called | |
181 | mode, it will return on each push whether the currently pushed code |
|
|||
182 | could be executed already. In addition, it provides a method called |
|
|||
183 | :meth:`push_accepts_more` that can be used to query whether more input |
|
181 | :meth:`push_accepts_more` that can be used to query whether more input | |
184 | can be pushed into a single interactive block. |
|
182 | can be pushed into a single interactive block. | |
185 |
|
183 | |||
186 | 2. By calling :meth:`split_blocks` with a single, multiline Python string, |
|
|||
187 | that is then split into blocks each of which can be executed |
|
|||
188 | interactively as a single statement. |
|
|||
189 |
|
||||
190 | This is a simple example of how an interactive terminal-based client can use |
|
184 | This is a simple example of how an interactive terminal-based client can use | |
191 | this tool:: |
|
185 | this tool:: | |
192 |
|
186 |
General Comments 0
You need to be logged in to leave comments.
Login now