开发者

Running external commands in IPython

开发者 https://www.devze.com 2023-01-10 18:27 出处:网络
I\'d like to run a new command from IPython configurat开发者_JAVA技巧ion and capture its output. Basically, I\'d like to access the equivalent of !command via normal functions. I know I can just use s

I'd like to run a new command from IPython configurat开发者_JAVA技巧ion and capture its output. Basically, I'd like to access the equivalent of !command via normal functions. I know I can just use subprocess, but since IPython already provides this functionality, I guess there must be a properly made wrapper included somewhere in the API.


Apparently, such wrapper can be called via ip.IP.getoutput("command").

0

精彩评论

暂无评论...
验证码 换一张
取 消