我可以执行ipython脚本吗?
答
肯定,只是IPython中使用Python运行它们作为你的一个普通的Python脚本:
$> echo '%time print "hello, world"' > script.ipy
$> ipython script.ipy
hello, world
CPU times: user 0.00 s, sys: 0.00 s, total: 0.00 s
Wall time: 0.00 s
+6
关键是'.ipy'的扩展名,否则它会尝试将它作为普通的python文件运行。 – 2012-08-04 11:39:03
HTTP: //whathaveyoutried.com/ – Marcin 2012-08-02 18:18:50