Executing external commands in IPython

I want to run a new command from the IPython configuration and write its output. Basically, I would like to access the equivalent !commandthrough regular functions. I know that I can just use it subprocess, but since IPython already provides this functionality, I assume that the shell should be properly made in the API.

+3
source share
1 answer

Apparently, such a shell can be called through ip.IP.getoutput("command").

+2
source

Source: https://habr.com/ru/post/1758074/


All Articles