How to send commands to ipython console session

824 views Asked by At

How do IDEs like Spyder send commands to their interactive ipython shell (such as runfile() when you click the run button)? Is there a way to open an ipython console and send commands to the kernel from outside the console (e.g. from a cmd or python script)?

I've read in the ipython documentation about messaging and the execute_request message type, but it gives no indication as to how you would implement that. And I'm not sure it's even what Spyder uses - in Spyder, when you click run, the runfile() command is inserted into the ipython console input.

0

There are 0 answers