python help获取帮助
来源:互联网 发布:cool edit pro有mac版 编辑:程序博客网 时间:2024/05/16 12:44
http://woodpecker.org.cn/abyteofpython_cn/chinese/ch03s06.html
1.
如果你需要某个Python函数或语句的快速信息帮助,那么你可以使用内建的help功能。尤其在你使用带提示符的命令行的时候,它十分有用。比如,运行help(str)——这会显示str类的帮助。str类用于保存你的程序使用的各种文本(字符串)。类将在后面面向对象编程的章节详细解释。按q退出帮助。
类似地,你可以获取Python中几乎所有东西的信息。使用help()去学习更多关于help本身的东西!
help('print')
你应该注意到我特意在“print”上使用了引号,那样Python就可以理解我是希望获取关于“print”的帮助而不是想要它打印东西
http://askubuntu.com/questions/230994/python-2-7-no-documentation-found-when-typing-helpprint
2.
Question:
I have just installed Python 2.7 and Python 3.2 on my Ubuntu 12.04 (32 bit).However if I open a Python 2.7 shell (python from a terminal) when I type help('print') I get the following message:
no documentation found for 'print'
How can I get to use the documentation in Python 2.7 as well?
Answer:
This looks like a bug of Python 2 as something like help("dir") works properly. It probably does not work because print is a special keyword, unlike Python 3. Stick to Python 3 or run the following command instead of help("print"):help("__builtin__.print")
- python help获取帮助
- Git--git help 获取帮助
- Python查看帮助---help函数
- Python 寻求帮助dir,help
- Python查看帮助---help函数
- Python入门的36个例子——02 Help! —— 如何获取帮助
- python基础31[help()来查看帮助]
- python基础31[help()来查看帮助]
- 用好Python帮助函数help(),dir(),type()
- Python 查看帮助文档 dir(),help()
- Python 的帮助--help、dir、type
- python文档帮助help()和dir()
- python离线获取帮助
- python获取帮助
- python如何获取帮助
- python帮助信息获取
- Python获取帮助详解
- 获取帮助python
- 黑马程序员java学习—Map集合
- 探索并发编程(七)------分布式环境中并发问题
- MINA框架使用总结
- 程序集和反射
- 设计与开发应用服务器(二)------相关技术
- python help获取帮助
- 地址总线 数据总线
- 几种经典算法回顾
- 用process实现的一个最简单的例子
- 如何提高学习效率
- 分布式设计与开发(一)------宏观概述
- 我的大学之“毕业季”
- 【十天学会Linq to sql】第二天—–数据上下文
- 分布式设计与开发(二)------几种必须了解的分布式算法