Show More
@@ -219,7 +219,7 b' class ShellSocketChannel(ZMQSocketChannel):' | |||||
219 | """ |
|
219 | """ | |
220 | raise NotImplementedError('call_handlers must be defined in a subclass.') |
|
220 | raise NotImplementedError('call_handlers must be defined in a subclass.') | |
221 |
|
221 | |||
222 | def execute(self, code, silent=False, |
|
222 | def execute(self, code, silent=False, store_history=True, | |
223 | user_variables=None, user_expressions=None, allow_stdin=None): |
|
223 | user_variables=None, user_expressions=None, allow_stdin=None): | |
224 | """Execute code in the kernel. |
|
224 | """Execute code in the kernel. | |
225 |
|
225 | |||
@@ -229,7 +229,12 b' class ShellSocketChannel(ZMQSocketChannel):' | |||||
229 | A string of Python code. |
|
229 | A string of Python code. | |
230 |
|
230 | |||
231 | silent : bool, optional (default False) |
|
231 | silent : bool, optional (default False) | |
232 |
If set, the kernel will execute the code as quietly possible |
|
232 | If set, the kernel will execute the code as quietly possible, and | |
|
233 | will force store_history to be False. | |||
|
234 | ||||
|
235 | store_history : bool, optional (default True) | |||
|
236 | If set, the kernel will execute store command history. This is forced | |||
|
237 | to be False if silent is True. | |||
233 |
|
238 | |||
234 | user_variables : list, optional |
|
239 | user_variables : list, optional | |
235 | A list of variable names to pull from the user's namespace. They |
|
240 | A list of variable names to pull from the user's namespace. They | |
@@ -267,7 +272,7 b' class ShellSocketChannel(ZMQSocketChannel):' | |||||
267 |
|
272 | |||
268 | # Create class for content/msg creation. Related to, but possibly |
|
273 | # Create class for content/msg creation. Related to, but possibly | |
269 | # not in Session. |
|
274 | # not in Session. | |
270 | content = dict(code=code, silent=silent, |
|
275 | content = dict(code=code, silent=silent, store_history=store_history, | |
271 | user_variables=user_variables, |
|
276 | user_variables=user_variables, | |
272 | user_expressions=user_expressions, |
|
277 | user_expressions=user_expressions, | |
273 | allow_stdin=allow_stdin, |
|
278 | allow_stdin=allow_stdin, |
General Comments 0
You need to be logged in to leave comments.
Login now