Python
Python
Python入门教程
- Python教程:Python游戏开发基础
- 30个不同的Python入门网站
- Google’s Python Class
- Learn Python with JetBrains Academy!
- Python Tutorial
- Dive Into Python 3 (中文版)
- A Byte of Python (中文版: 简明Python教程)
- Python Programming - Wikibooks
- Non-Programmers Tutorial For Python
- MIT 6.0001 Introduction to Computer Science and Programming in Python
- How to Think Like a Computer Scientist (Learning with Python 3)
- Python by Example by Xah Lee
- Learn to Program by Alan G
- Invent with Python
- Python 非編程員教學
- Python for Lisp Programmers
已经过时的教程(基于已经淘汰的Python 2):
- 另类的Python教程: 我的名字叫Python.pdf (太古老,已过时)
- Python Short Course by Richard P. Muller (太古老,已过时)
- The LiveWires Python Course 已过时
- Handbook of the Physics Computing Course 已过时
- Python入门
Python解释器
Python开发环境
- Mac上Python环境准备: https://sourabhbajaj.com/mac-setup/Python/
- One Day of IDLE Toying (中文版: 摆弄一天IDLE)
- Using IDLE by Daryl Harms
- Pipenv & Virtual Environments
- Why you should use pyenv + Pipenv for your Python projects
- Advanced Usage of Pipenv
- poetry
- pyflow
- hatch
- flit
- briefcase
- Python’s New Package Landscape
- PyPA
- warehouse
Python语法
- Python语法 from Wikipedia
- Python Gotchas
- 30 Python Best Practices, Tips, And Tricks
- Python yield 使用浅析
- Cheat Sheet: Writing Python 2-3 compatible code
- Type hints cheat sheet (Python 3)
- Python Reference Manual
- Async IO in Python: A Complete Walkthrough
- How the heck does async/await work in Python 3.5?
- Python’s super() considered super!
- Coroutines and Tasks
- PEP 492 – Coroutines with async and await syntax
代码风格
- Python Style Guide
- https://www.python.org/dev/peps/pep-0008/
- https://www.python.org/dev/peps/pep-0257/
- Code Style – The Hitchhiker’s Guide to Python
- Open Sourcing a Python Project the Right Way
参考资料
awesome python https://github.com/vinta/awesome-python
Why_Python by Eric Raymond why python中文版
Python 101 – Introduction to Python Python 201 – (Slightly) Advanced Python Topics
Python_Advocacy_HOWTO by A.M. Kuchling
Learning to Program: attachment: http://www.freenetpages.co.uk/hp/alan.gauld/
Learn To Program CD: LearnToProgramCD.zip
Tkinter Life Preserver: http://www.python.org/doc/life-preserver/
Python库
标准库
GUI Toolkit
- wxpython http://www.wxpython.org/
- PyGtk
- Kivy 基于OpenGL ES的移动端、桌面端GUI开发库
- 使用PyQt编写QT图形界面程序 http://www.riverbankcomputing.co.uk/pyqt/
- PyQT vs PySide2
DB
网络
Web 开发
- Django
- WebProgramming - Python Wiki
- Flask: https://flask.palletsprojects.com/en/1.1.x/
- Better Web App
Windows
- pywin32 http://sourceforge.net/projects/pywin32/
- comtypes http://starship.python.net/crew/theller/comtypes/
- python 与 COM Advanced Python and COM
- 使用_winreg模块操纵windows注册表
- 将python程序打包成windows下可以执行的exe文件:使用py2exe模块
- 在.net平台上使用python:IronPython
Mac
多媒体
- 图像获取:linux平台下使用sane模块,Windows平台下使用twain模块
- 图像处理PythonImageLibrary中文手册
- 通过ffmpeg处理视频、音频 https://github.com/kkroening/ffmpeg-python
- PyDUB:在python中直接处理音频 https://github.com/jiaaro/pydub
游戏
- pygame: http://www.pygame.org/
- panda3d: http://www.panda3d.org/
- renpy: http://www.renpy.org/wiki/renpy/Home_Page
- pyopengl http://pyopengl.sourceforge.net/
字符串
- Unicode Howto
- http://docs.python.org/lib/module-re.html
- http://www.amk.ca/python/howto/regex/
- Mastering Regular Expressions 2nd Edition, By Jeffrey E. F. Friedl
- Click 命令行参数处理
数据处理
其它
- python-ldap http://www.python-ldap.org/
- 读取excel:用xlrd包。把excel转成csv,使用csv库操作。
- 加密:Python Cryptography Toolkit http://www.amk.ca/python/code/crypto
- Spring Python: 为什么Python不需要像Spring这样的东西?
- PLY Python Lex-Yacc
Python的字符编码处理
对于中文用户,特别需要关注Python的编码技术. 列举一些常用的技巧。
chr(i): 将一个0到255的整数转换为一个字符.
ord(c): 返回单个字符c的整数顺序值.普通字符返回[0,255]中的一个值,Unicode字符返回 [0,65535]中的一个值
unichr(i): 将一个0到65535的整数转换为一个Unicode字符
- 代码中的编码设置,应该在代码最初两行内包含:
# -*- coding: UTF-8 -*-
- 获得/设置系统的缺省编码
sys.getdefaultencoding()
sys.setdefaultencoding('utf-8')
- 获得文件系统的文件名的编码
sys.getfilesystemencoding()
- 获得当前终端的输入、输出编码
sys.stdout.encoding
sys.stdin.encoding
- 编码转换(先转换为unicode,再转换为具体的编码),有两种方法:
unicode('abc', 'mbcs').encode('utf-8')
'abc'.decode('mbcs').encode('utf-8')