python
文章平均质量分 80
chilv
这个作者很懒,什么都没留下…
展开
-
查看Python包模块中的函数
在使用python的过程中有时需要import其他的包模块,而此时我们需要查看这个模块中提供了哪些函数,是否有像linux man一样可以查询的功能?在python中我们可以通过进入python控制台并导入相关的包模块,再使用help(模块名)来查看这个包模块的信息及相关的函数接口说明等。以下已pycurl包举例说明用法:1. 进入python 并导入包root@ubuntu:/home/lvjc...原创 2018-03-08 14:59:20 · 41889 阅读 · 0 评论 -
Ubuntu 16.04 搭建python环境
准备安装python3.5 和pip。1. 安装python3.5root@ubuntu:/home/lvjc/# sudo apt-get updateroot@ubuntu:/home/lvjc/# sudo apt-get install python3.5root@ubuntu:/home/lvjc/# sudo mv /usr/bin/python /usr/bin/python_b...原创 2018-03-08 15:09:24 · 615 阅读 · 0 评论 -
What does if __name__ == “__main__”: do?
转自:https://stackoverflow.com/questions/419163/what-does-if-name-main-doWhen your script is run by passing it as a command to the Python interpreter,python myscript.pyall of the code that is at indenta...转载 2018-03-08 15:51:09 · 172 阅读 · 0 评论