12170
备注:
|
12083
|
删除的内容标记成这样。 | 加入的内容标记成这样。 |
行号 5: | 行号 5: |
<<Include(Python介绍)>> 参考: * [[http://en.wikipedia.org/wiki/Python_%28programming_language%29|Wikipedia:Python_programming_language]] ([[http://zh.wikipedia.org/wiki/Python|Wikipedia上的Python编程语言简介]]) * [[http://www.python.org/|Python Official Web]] * [[http://en.wikipedia.org/wiki/Python_syntax_and_semantics|Python语法]] from Wikipedia * [[http://www.linuxjournal.com/article/3882|Why_Python]] by Eric Raymond [[http://blog.sina.com.cn/s/blog_53982851010008b8.html|why python中文版]] * [[http://www.norvig.com/python-lisp.html|Python for Lisp Programmers]] == Python解释器 == * CPython http://python.org/ * Stackless Python http://www.stackless.com/ * [[StacklessPython]] * Ironpython (Python for .Net) https://ironpython.net/ * Jython (Python for Java) https://www.jython.org/ * [[https://www.pypy.org/|PyPy]] * [[https://speed.pypy.org/|PyPy Speed]] * [[http://hylang.org|Hylang]] A dialect of Lisp that's embedded in Python == Python开发环境 == * Mac上Python环境准备: https://sourabhbajaj.com/mac-setup/Python/ * [[http://hkn.eecs.berkeley.edu/~dyoo/python/idle_intro/index.html|One Day of IDLE Toying]] (中文版: [[http://hkn.eecs.berkeley.edu/~dyoo/python/idle_intro/IDLE-chinese.htm|摆弄一天IDLE]]) * [[http://ftp.ntua.gr/mirror/python/idle/doc/idle2.html|Using IDLE]] by Daryl Harms * [[https://docs.python-guide.org/dev/virtualenvs/|Pipenv & Virtual Environments]] * [[https://hackernoon.com/reaching-python-development-nirvana-bb5692adf30c|Why you should use pyenv + Pipenv for your Python projects]] * [[https://pipenv.pypa.io/en/latest/advanced/|Advanced Usage of Pipenv]] |
* [[Python介绍]] |
行号 33: | 行号 8: |
行号 47: | 行号 23: |
* [[http://www.norvig.com/python-lisp.html|Python for Lisp Programmers]] | |
行号 56: | 行号 33: |
== Python解释器 == * CPython http://python.org/ * Stackless Python http://www.stackless.com/ * [[StacklessPython]] * Ironpython (Python for .Net) https://ironpython.net/ * Jython (Python for Java) https://www.jython.org/ * [[https://www.pypy.org/|PyPy]] * [[https://speed.pypy.org/|PyPy Speed]] * [[http://hylang.org|Hylang]] A dialect of Lisp that's embedded in Python == Python开发环境 == * Mac上Python环境准备: https://sourabhbajaj.com/mac-setup/Python/ * [[http://hkn.eecs.berkeley.edu/~dyoo/python/idle_intro/index.html|One Day of IDLE Toying]] (中文版: [[http://hkn.eecs.berkeley.edu/~dyoo/python/idle_intro/IDLE-chinese.htm|摆弄一天IDLE]]) * [[http://ftp.ntua.gr/mirror/python/idle/doc/idle2.html|Using IDLE]] by Daryl Harms * [[https://docs.python-guide.org/dev/virtualenvs/|Pipenv & Virtual Environments]] * [[https://hackernoon.com/reaching-python-development-nirvana-bb5692adf30c|Why you should use pyenv + Pipenv for your Python projects]] * [[https://pipenv.pypa.io/en/latest/advanced/|Advanced Usage of Pipenv]] |
|
行号 58: | 行号 55: |
* [[http://en.wikipedia.org/wiki/Python_syntax_and_semantics|Python语法]] from Wikipedia | |
行号 81: | 行号 79: |
行号 83: | 行号 82: |
* [[http://www.linuxjournal.com/article/3882|Why_Python]] by Eric Raymond [[http://blog.sina.com.cn/s/blog_53982851010008b8.html|why python中文版]] |
|
行号 112: | 行号 113: |
* [[https://app.getpocket.com/read/2956522352|Python 2.7.18, the end of an era]] * [[http://python-future.org/|Easy, clean, reliable Python 2/3 compatibility]] |
Python
目录
1. Python入门教程
Python教程:Python游戏开发基础
A Byte of Python (中文版: 简明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
已经过时的教程(基于已经淘汰的Python 2):
另类的Python教程: 我的名字叫Python.pdf (太古老,已过时)
Python Short Course by Richard P. Muller (太古老,已过时)
2. Python解释器
CPython http://python.org/
Stackless Python http://www.stackless.com/
Ironpython (Python for .Net) https://ironpython.net/
Jython (Python for Java) https://www.jython.org/
Hylang A dialect of Lisp that's embedded in Python
3. Python开发环境
Mac上Python环境准备: https://sourabhbajaj.com/mac-setup/Python/
One Day of IDLE Toying (中文版: 摆弄一天IDLE)
Using IDLE by Daryl Harms
4. Python语法
Python语法 from Wikipedia
5. 代码风格
6. 参考资料
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/
7. Python库
7.1. 标准库
7.2. GUI Toolkit
wxpython http://www.wxpython.org/
Kivy 基于OpenGL ES的移动端、桌面端GUI开发库
使用PyQt编写QT图形界面程序 http://www.riverbankcomputing.co.uk/pyqt/
7.3. 网络
7.4. Web 开发
7.5. Windows
python 与 COM Advanced Python and COM
- 使用_winreg模块操纵windows注册表
将python程序打包成windows下可以执行的exe文件:使用py2exe模块
在.net平台上使用python:IronPython
7.6. Mac
7.7. 多媒体
- 图像获取:linux平台下使用sane模块,Windows平台下使用twain模块
通过ffmpeg处理视频、音频 https://github.com/kkroening/ffmpeg-python
PyDUB:在python中直接处理音频 https://github.com/jiaaro/pydub
7.8. 游戏
pygame: http://www.pygame.org/
panda3d: http://www.panda3d.org/
pyopengl http://pyopengl.sourceforge.net/
7.9. 字符串
- Mastering Regular Expressions 2nd Edition, By Jeffrey E. F. Friedl
7.10. 数据处理
7.11. 其它
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这样的东西?
8. 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')