博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
Python网络资源 + Python Manual
阅读量:6913 次
发布时间:2019-06-27

本文共 2788 字,大约阅读时间需要 9 分钟。

如何学习Python + 如何有效利用Python有关的网络资源 + 如何利用Python自带手册(Python Manual)

然后根据情况,选择自己需要的python版本,然后才涉及到,如何学习的问题。

 

【学习Python的基本流程】

1.先学习Python的基础知识

推荐资料:

中文主页是:

 

可以在线看:

也可以下载各种格式:

留本地看。 

 

1. Python的第三方库

python的第三方库,数量巨大,功能巨多,但是正是由于太多,不可能一一总结。

但是python官网,人家已经整理出来了,都放到这里了:

该页面由于库太多,看着很不方便。

这里有分类查看:

 

如果需要某些方面的功能,可以去上述两个地址中,找找有没有现成的库,如果有的话,直接拿过来用,比你从头开发,要高效的多。

 

2. 各种Python的总结方面的资料

其中包括我写的,其中主要分两块:

(1)

总结了自己折腾python过程中的一些理解,和一些细节方面的注意事项。

(2)

自己把一些常用的Python的函数,整理出来,供自己和别人使用。

尤其是很多网络方面的函数,等你用到了,就会知道会省你不少精力的。

 

【如何利用Python自带手册 Python Manual】

其中,关于查参考资料,特别要提示的一点是,对于很多不熟悉的python函数,最佳的学习方法,个人认为是先去Python自带手册中去查找。

而Python自带手册,是你安装好Python之后,(我的是windows环境,通过exe安装的python 2.7版的),可以通过开始->Python 27-> Python Mannuals:

 

比如涉及到网络编程,需要用到urllib2这个模块,想要搞懂urllib2。

那么第一步,就可以先去通过manual找到urllib2:

然后再去看看其语法:

urllib2.
urlopen
(url[, data][, timeout]
)
Open the URL url, which can be either a string or a 
Request object.

Warning

HTTPS requests do not do any verification of the server’s certificate.

data may be a string specifying additional data to send to the server, or None if no such data is needed. Currently HTTP requests are the only ones that use data; the HTTP request will be a POST instead of a GET when the data parameter is provided. data should be a buffer in the standard application/x-www-form-urlencoded format. The urllib.urlencode() function takes a mapping or sequence of 2-tuples and returns a string in this format. urllib2 module sends HTTP/1.1 requests withCONNECTION:CLOSEheader included.

The optional timeout parameter specifies a timeout in seconds for blocking operations like the connection attempt (if not specified, the global default timeout setting will be used). This actually only works for HTTP, HTTPS and FTP connections.

This function returns a file-like object with two additional methods:

  • geturl() — return the URL of the resource retrieved, commonly used to determine if a redirect was followed
  • info() — return the meta-information of the page, such as headers, in the form of an mimetools.Message instance (see )

Raises URLError on errors.

Note that None may be returned if no handler handles the request (though the default installed global OpenerDirector uses UnknownHandler to ensure this never happens).

In addition, default installed ProxyHandler makes sure the requests are handled through the proxy when they are set.

Changed in version 2.6: timeout was added.

如此,对于其有个基本的了解后,再去网上详细看看别人的示例代码。

这样,有助于你快速,准确的,学习此库函数。

至少,我对于很多很多的python内置库函数,都是这样慢慢逐渐学习和了解的。

 

 

  • Swaroop, C. H. 著,>沈洁元 译

    特点:内容很全。

  • 关于python的中文文档

    这里:介绍了很多的资源。其中就有

  • 在线实时演示Python代码的运行

  • Python的示例程序

  • 各种Python的示例代码

  • Python风格的详尽解释和举例

  • 如何写自己的库函数

    值得学习学习。关于自己写类,库函数时,如何写,如何处理logger和异常等等方面,值得学习。

  • Python资料大全

    收集了N多关于的Python的网站、教程、图书、框架、应用等等内容。

  • 关于有介绍Python的IDE

  • MicroPython

    之前看到一个好玩的,另类版本的Python:

转载地址:http://cbacl.baihongyu.com/

你可能感兴趣的文章
shell中的算数比较
查看>>
quota(linux下的磁盤配額)
查看>>
【MySQL数据库开发之四】MySQL 处理模式/常用查询/模式匹配等
查看>>
Linux NFS服务器配置
查看>>
C++实现计数排序
查看>>
PPT组件Aspose.Slides V17.8发布 | 支持PP2010 PPTX与嵌入式视频
查看>>
Postfix全功能 (1)
查看>>
DOS系统功能调用表(INT 21H)
查看>>
作为JavaScript开发人员,这些必备的VS Code插件你都用过吗
查看>>
未来云世界畅想
查看>>
进程与计划任务
查看>>
组合模式
查看>>
linux文件操作之ls、mkdir、rmdir、cp命令使用
查看>>
观察最大堆的插入/删除元素后最大堆的变化
查看>>
oracle导入时IMP-00010: 不是有效的导出文件, 头部验证失败
查看>>
R:corrplot包
查看>>
用SPK技术分析,泰坦尼克号沉船之后哪些人活下来了
查看>>
多线程(八)---单例模式并发访问
查看>>
堵车预测神器诞生 浙江已用来治疗高速顽疾
查看>>
Android Span的简单使用
查看>>