微信扫一扫,移动浏览光盘
简介
本书是Python用户的一本百科式学习指南,由Python社区数百名成员协作奉献。全书内容分为三大部分。*部分是关于如何配置使用Python编辑工具的;第二部分深入学习地道Python风格的代码范例;第三部分研究Python社区常用的一些代码库。本书适合有一定Python基础的人员学习,帮助你迅速从小工修炼成专家,编写出高质量的代码!
目录
目录
前言 ........................................................................................... xix
第1 部分 起步
第1 章 选择一个解释器 ........................................................................ 3
Python 2 与Python 3 的状况对比 ..........................................................................3
建议 .......................................................................................................................3
那就选择Python 3 吗 .............................................................................................4
Python 的不同实现 ................................................................................................4
CPython ...........................................................................................................5
Stackless ..........................................................................................................5
PyPy ................................................................................................................5
Jython ..............................................................................................................5
IronPython .......................................................................................................6
PythonNet ........................................................................................................6
Skulpt ..............................................................................................................6
MicroPython ....................................................................................................7
第2 章 恰当地安装Python ................................................................... 9
在Mac OS X 上安装Python ..................................................................................9
Setuptools 和pip ........................................................................................... 11
virtualenv ...................................................................................................... 11
在Linux 上安装Python .......................................................................................12
Setuptools 和pip ...........................................................................................12
开发工具 .......................................................................................................13
virtualenv ......................................................................................................14
在Windows 上安装Python ..................................................................................15
Setuptools 和pip ...........................................................................................17
virtualenv ......................................................................................................17
商业化Python 二次发行版 ..................................................................................18
第3 章 搭建开发环境 ......................................................................... 21
文本编辑器 ..........................................................................................................21
Sublime Text ..................................................................................................22
Vim ................................................................................................................23
Emacs ............................................................................................................25
TextMate........................................................................................................26
Atom .............................................................................................................26
Code ..............................................................................................................26
IDE.......................................................................................................................27
PyCharm/IntelliJ IDEA ..................................................................................28
Aptana Studio 3/Eclipse LiClipse PyDev .....................................................29
WingIDE........................................................................................................29
Spyder ...........................................................................................................30
NINJA-IDE ....................................................................................................30
Komodo IDE..................................................................................................30
Eric(Eric Python IDE) .................................................................................31
Visual Studio .................................................................................................31
增强型交互式工具 ...............................................................................................32
IDLE .............................................................................................................32
IPython ..........................................................................................................32
bpython ..........................................................................................................33
环境隔离工具 ......................................................................................................33
虚拟环境 .......................................................................................................33
pyenv .............................................................................................................35
Autoenv .........................................................................................................36
virtualenvwrapper ..........................................................................................36
Buildout .........................................................................................................37
Conda ............................................................................................................38
Docker ...........................................................................................................39
第2 部分 步入正题
第4 章 编写高质量的代码 ................................................................... 43
代码风格 ..............................................................................................................43
PEP 8 .............................................................................................................43
PEP 20(又名Python 之禅) ..........................................................................44
一般性建议 ...................................................................................................45
约定 ...............................................................................................................52
习语 ...............................................................................................................55
常见陷阱 .......................................................................................................58
组织好项目的结构 ...............................................................................................61
模块 ...............................................................................................................61
包 ..................................................................................................................65
面向对象编程 ................................................................................................66
装饰器 ...........................................................................................................67
动态
Python编程之美:最佳实践指南
光盘服务联系方式: 020-38250260 客服QQ:4006604884
云图客服:
用户发送的提问,这种方式就需要有位在线客服来回答用户的问题,这种 就属于对话式的,问题是这种提问是否需要用户登录才能提问
Video Player
×
Audio Player
×
pdf Player
×