Sent to you by l5g via Google Reader:
via huangjiahua~~我自己的世界 on 6/27/07
许多人都知道 iPython 有很好的自动补全能力,但是就未必知道 python 也同样可以 Tab 键补全,您可以在启动 python 后,执行下
import readline, rlcompleter; readline.parse_and_bind("tab: complete")
这就可以按 Tab 键补全了。
python 自启动
如果您嫌每次都要键入这东西麻烦的话,可以把上边这行写到 ~/.pythonstartup.py ,
再 ~/.bashrc 里加一个环境变量
export PYTHONSTARTUP=~/.pythonstartup.py
这就会每次启动 python 都先执行了
Things you can do from here:
- Subscribe to huangjiahua~~我自己的世界 using Google Reader
- Get started using Google Reader to easily keep up with all your favorite sites
No comments:
Post a Comment