IPython、Notebook、qtconsole使用教程

IPython、Notebook、qtconsole使用教程
上一篇为Python,IPython,qtconsole,Notebook,Jupyter快速安装教程

1. 使用IPython

  • 自动补全功能,使用tab键,如输入im后按tab键,可自动补全import。
  • 进入IPython,CMD中输入ipython
  • 退出IPython,CMD中输入quit()
    IPython、Notebook、qtconsole使用教程
  • 使用魔法指令%
    • %run test.py 直接运行python脚本
    • %pwd: 显示当前工作目录。
    • %cd: 切换工作目录。
    • %bookmark: 工作目录书签
  • 使用快捷键
    • ctrl+u 删除整行(光标在最后)
    • ctrl+k 删除整行(光标在最前)
    • ctrl+l 清空屏幕
    • ctrl+c 中止运行程序
    • ctrl+e 跳转到最后
    • ctrl+a 跳转到第一行(与Windows热键冲突,是全选)
    • ctrl+r 反向搜索历史

2. 使用Notebook

2.1打开Notebook
在CMD中输入ipython notebook
IPython、Notebook、qtconsole使用教程
2.2默认浏览器会打开http://localhost:8888/tree#
IPython、Notebook、qtconsole使用教程
2.3新建Python(换行shift+enter)
IPython、Notebook、qtconsole使用教程
3.使用qtconsole

上一篇:一、搭建篇-使用Github-hexo搭建个人博客教程—总结自己爬过的坑


下一篇:删除字符串中指定位置的字符