大年初二,哪也去不了,只有在家读书了。
2020年1月26日早8点开始读。这本书可以在此网站免费阅读。
2月6日下午14:40读完。
这本书还是比较实用和全面的!整个实用环境用的是Oracle Linux。
本书的出版社页面。
作者的其它书可参加这里。
这本书,如作者所说:it’s a guide for beginners
关于编程,引用作者的话:
This is the power of computer programming. A computer is like a Swiss Army knife that you can configure for countless tasks. Many people spend hours clicking and typing to perform repetitive tasks, unaware that the machine they’re using could do their job in seconds if they gave it the right instructions.
Programming is simply the act of entering instructions for the computer to perform.
Python的名字来自英国超现实主义戏剧组合Monty Python,而不是蛇。
Python编程不需要太多数学,何时学都不会太晚。编程是一种创作。
Linux下安装Python:
yum install python3
yum install python3-pip # 此句没有必要,因为pip已包含在python3中
随书示例代码从这里下载,约8.4M。
其中包括一个文件automate-linux-requirements.txt
,内容如下:
$ cat automate-linux-requirements.txt
send2trash==1.5.0
requests==2.21.0
beautifulsoup4==4.7.1
selenium==3.141.0
openpyxl==2.6.1
PyPDF2==1.26.0
python-docx==0.8.10
imapclient==2.1.0
pyzmail36==1.0.4
twilio
pillow==5.4.1
PyInputPlus==0.2.6
ezgmail==0.0.4
ezsheets==0.0.2
python3-xlib==0.15
运行以下安装本书所需所有模块:
$ pip3 install --user -r automate-linux-requirements.txt --user
作者所说的Mu在Linux下不支持,用交互式shell就好。
安装第三方模块用pip
。
如何获取帮助:
- docs.python.org
- 交互式shell中的help()
如何问问题:
- https://stackoverflow.com/
- https://reddit.com/r/learnprogramming/
- https://pastebin.com/
- https://autbor.com/help/
- https://inventwithpython.com/blog/2018/02/02/how-to-ask-for-programming-help/
- https://inventwithpython.com/blog/
- https://reddit.com/r/inventwithpython/
- https://gist.github.com/
以下是读书进度表。
PART I PYTHON PROGRAMMING BASICS
章节 | 开始 | 结束 | 链接 |
---|---|---|---|
1 | 2020/1/26 | 2020/1/26 | PYTHON BASICS |
2 | 2020/1/26 | 2020/1/26 | FLOW CONTROL |
3 | 2020/1/26 | 2020/1/26 | FUNCTIONS |
4 | 2020/1/26 | 2020/1/26 | LISTS |
5 | 2020/1/26 | 2020/1/27 | DICTIONARIES AND STRUCTURING DATA |
6 | 2020/2/28 | 2020/2/28 | MANIPULATING STRINGS |
PART II AUTOMATING TASKS
章节 | 开始 | 结束 | 链接 |
---|---|---|---|
7 | 2020/1/28 | 2020/1/28 | PATTERN MATCHING WITH REGULAR EXPRESSIONS |
8 | 2020/1/29 | 2020/1/29 | INPUT VALIDATION |
9 | 2020/1/29 | 2020/1/30 | READING AND WRITING FILES |
10 | 2020/1/30 | 2020/1/31 | ORGANIZING FILES |
11 | 2020/1/31 | 2020/1/31 | DEBUGGING |
12 | 2020/1/31 | 2020/2/2 | WEB SCRAPING |
13 | 2020/2/2 | 2020/2/2 | WORKING WITH EXCEL SPREADSHEETS |
14 | 2020/2/6 | 2020/2/6 | WORKING WITH GOOGLE SHEETS |
15 | 2020/2/3 | 2020/2/3 | WORKING WITH PDF AND WORD DOCUMENTS |
16 | 2020/2/3 | 2020/2/3 | WORKING WITH CSV FILES AND JSON DATA |
17 | 2020/2/3 | 2020/2/3 | KEEPING TIME, SCHEDULING TASKS, AND LAUNCHING PROGRAMS |
18 | 2020/2/6 | 2020/2/6 | SENDING EMAIL AND TEXT MESSAGES |
19 | 2020/2/5 | 2020/2/5 | MANIPULATING IMAGES |
20 | 2020/2/5 | 2020/2/5 | CONTROLLING THE KEYBOARD AND MOUSE WITH GUI AUTOMATION |
附录A为安装额外的包,附录B为如何运行程序,附录C为每一章末问题的答案。
单词
etiquette - 礼仪