![](https://img-blog.csdnimg.cn/20201014180756928.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
python
tensiongyb
这个作者很懒,什么都没留下…
展开
-
拿ipython当shell用
ipython 不光可以执行 shell 命令,还可以把 shell 和 python 脚本混用。我当前目录下有 1.Wma 到 80.Wma 需要重命名为小写的 1.wma 到 80.wma,可以这么做:python 代码 files = !ls for f in files: !mv $f...2007-08-07 16:29:00 · 140 阅读 · 0 评论 -
ipython介绍
ipython 是一个 python 的交互式 shell,比默认的 python shell 好用得多,支持变量自动补全,自动缩近,支持 bash shell 命令,内置了许多很有用的功能和函数。在 ubuntu 下只要 sudo apt-get install ipython 就装好了,通过 ipython 启动。下面是 ipython 中几个简单好用的 magic 函数:%bg func...2007-08-08 09:31:23 · 209 阅读 · 0 评论 -
拿ipython当shell用
ipython 不光可以执行 shell 命令,还可以把 shell 和 python 脚本混用。我当前目录下有 1.Wma 到 80.Wma 需要重命名为小写的 1.wma 到 80.wma,可以这么做:files = !lsfor f in files: !mv $f $f.lower() 解释一下: ! 代表执行的 shell 命令,$ 代表以 python 字符串到 shell ...2007-08-09 06:19:57 · 273 阅读 · 0 评论