Python帮助文档的设置


Python帮助文档的设置
2010年06月20日
  为了可以在交互模式下利用help命令查看帮助信息,需要进行的配置如下:
  (1).到Python的网站查看相应版本的文档下载地址,如: #wget http://docs.python.org/ftp/python/doc/2.5/html-2.5 .tar.bz2 (2).解压后放置到合适的目录,如:
  #tar -jxvf html-2.5.tar.bz2 -C /usr/python/docs/
  (3).编辑~/.bash_profile文件增加PYTHONDOCS环境变量
  PYTHONDOCS=/usr/ali/python/doc/Python-Docs-2.5/
  export PYTHONDOCS
  (4).验证:
  #bash
  #python
  Python 2.5.4 (r254:67916, Mar  8 2010, 19:24:21)
  [GCC 4.1.2 20080704 (Red Hat 4.1.2-46)] on linux2
  Type "help", "copyright", "credits" or "license" for more information.
  >>> help('print')
  注意:笔者增加在Linux平台上下载使用python-2.5.4-docs-html.zip ,解压后不能正常使用,我猜测可能这个适合WindowsOS的环境吧。

猜你喜欢

转载自jibkf89v.iteye.com/blog/1363047