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

都差点忘了说了,在看下面所有的内容之前,对于python版本不了解的,请一定先看看这个:

【整理】总结Python2(Python 2.x版本)和Python3(Python 3.x版本)之间的区别

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

【学习Python的基本流程】

1.先学习Python的基础知识

推荐资料:

Dive Into Python

中文主页是:

http://woodpecker.org.cn/diveintopython/

可以在线看:

深入 Python :Dive Into Python 中文版

也可以下载各种格式:

留本地看。

1. Python的第三方库

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

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

http://pypi.python.org/pypi?%3Aaction=index

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

这里有分类查看:

http://pypi.python.org/pypi?%3Aaction=browse

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

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

其中包括我写的Python语言总结,其中主要分两块:

(1)python学习心得和体会

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

(2)crifan的Python库:crifanLib.py

自己把一些常用的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 Quick Reference to HTTP Headers)

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内置库函数,都是这样慢慢逐渐学习和了解的。

Python网络资源 + Python Manual的更多相关文章

  1. 1 python学习——python环境配置

    1 python学习--python环境配置 要学习python语言,光看书看教程还是不好,得动手去写.当然,不管学习什么编程语言,最佳的方式还在于实践. 要实践,先得有一个Python解释器来解释执 ...

  2. CentOS使用virtualenv搭建独立的Python环境-python虚拟环境

    CentOS使用virtualenv搭建独立的Python环境-python虚拟环境 virtualenv可以搭建虚拟且独立的python环境,可以使每个项目环境与其他项目独立开来,保持环境的干净,解 ...

  3. Embeding Python & Extending Python with FFPython

    Introduction ffpython is a C++ lib, which is to simplify tasks that embed Python and extend Python. ...

  4. python 运行python manege.py runserver时报错:“no module named djangorestframework” 的解决方案

    python 运行python manege.py runserver时报错:“no module named djangorestframework” 的解决方案 importerror:no mo ...

  5. 翻译文章“AST 模块:用 Python 修改 Python 代码”---!!注意ironpathyon未实现此功能

    https://github.com/upsuper/blog/commit/0214fdd084c4adf2de2ed9912d644fb59ce13a1c +Title: [翻译] AST 模块: ...

  6. Python学习(二) 运行Python,编译Python

    无论windos还是Linux只要安装了python,配置好了环境变量,则在命令行输入python这个命令的时候就会进入交互模式.在这个模式下可以进行一些简单的python代码编写.退出可以使用exi ...

  7. Python:Python学习总结

    Python:Python学习总结 背景 PHP的$和->让人输入的手疼(PHP确实非常简洁和强大,适合WEB编程),Ruby的#.@.@@也好不到哪里(OO人员最该学习的一门语言). Pyth ...

  8. Python 正则表达式 (python网络爬虫)

    昨天 2018 年 01 月 31 日,农历腊月十五日.20:00 左右,152 年一遇的月全食.血月.蓝月将今晚呈现空中,虽然没有看到蓝月亮,血月.月全食也是勉强可以了,还是可以想像一下一瓶蓝月亮洗 ...

  9. Python和Python解释器

    目录 Python介绍(了解) Python解释器发展史(了解) Python解释器(了解) CPython IPython PyPy Jython IronPython 安装Python解释器(掌握 ...

随机推荐

  1. 在Raspberry上使用小度WIFI

    小度WIFI价格便宜量又足,我一真用它!做个广告先! 它使用联发科MT7601的芯片,质量不错,就是Raspberry下不能直接支持. 首先下载驱动 http://www.mediatek.com/_ ...

  2. Java 学习 第一篇

    1:Java文档注释:使用javadoc工具可以提取程序中文档注释来生成API文档:javadoc命令的基本用法:javadoc 选项 java源文件/包javadoc -d {} -windowti ...

  3. USB系列之三:从你的U盘里读出更多的内容

    U盘是我们最常使用的一种USB设备,本文继续使用DOSUSB做驱动,试图以读取扇区的方式读取你的U盘.本文可能涉及的协议可能会比较多. 一.了解你的U盘    首先我们用上一篇文章介绍的程序usbvi ...

  4. cf472A Design Tutorial: Learn from Math

    A. Design Tutorial: Learn from Math time limit per test 1 second memory limit per test 256 megabytes ...

  5. 经验:Ubuntu 登陆 L2TP VPN

    Ubuntu Linux 操作系统默认支持PPTP协议的VPN登陆,但是随着网络环境的复杂化,我们需要使用L2TP协议的VPN登陆,下面,我们只需要简单的几条命令即可登陆L2TP协议的VPN.     ...

  6. UESTC_One Step Two Steps CDOJ 1027

    As we all know,the handsome boy, Zcat, has a fever of flat shoes. He sings it on the class, in the d ...

  7. mongodb debug

    1,MongoDb log use local; db.startup_log.find();

  8. 【转】基于V4L2的视频驱动开发

    编写基于V4L2视频驱动主要涉及到以下几个知识点:1> 摄像头方面的知识 要了解选用的摄像头的特性,包括访问控制方法.各种参数的配置方法.信号输出类型等.2> Camera解码器.控制器 ...

  9. Oracle SQL函数之聚组函数

    AVG([distinct|all]x) [功能]统计数据表选中行x列的平均值. [参数]all表示对所有的值求平均值,distinct只对不同的值求平均值,默认为all 如果有参数distinct或 ...

  10. Excel中将时间格式转化成时间戳格式

    时间戳转成正常日期的公式:C1=(A1+8*3600)/86400+70*365+19其中A1表示当时的1249488000时间戳数值其中C1就是所需的日期格式,C1单元格属性改成日期格式就可以了.正 ...