##// END OF EJS Templates
Update docstring for InputSplitter.
Thomas Kluyver -
Show More
@@ -173,20 +173,14 b' def get_input_encoding():'
173 173 #-----------------------------------------------------------------------------
174 174
175 175 class InputSplitter(object):
176 """An object that can split Python source input in executable blocks.
176 """An object that can accumulate lines of Python source before execution.
177 177
178 This object is designed to be used in one of two basic modes:
179
180 1. By feeding it python source line-by-line, using :meth:`push`. In this
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
178 This object is designed to be fed python source line-by-line, using
179 :meth:`push`. It will return on each push whether the currently pushed
180 code could be executed already. In addition, it provides a method called
183 181 :meth:`push_accepts_more` that can be used to query whether more input
184 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 184 This is a simple example of how an interactive terminal-based client can use
191 185 this tool::
192 186
General Comments 0
You need to be logged in to leave comments. Login now