版本9和112间的区别 (跳过第103版)
于2006-05-18 12:55:11修订的的版本9
大小: 1869
编辑: czk
备注:
于2020-03-31 14:35:36修订的的版本112
大小: 5292
编辑: czk
备注:
删除的内容标记成这样。 加入的内容标记成这样。
行号 1: 行号 1:
[[TableOfContents]]
= Python语言 =
= Python =
行号 4: 行号 3:
== Python的编码处理技术 ==  * Python教程:[[Python游戏开发基础]]
 * [[StacklessPython]]
 * [[Python小程序]]
 * [[Python使用技巧]]
 * [[Python相关软件]]
 * [[Python介绍]] from Wikipedia
 * [[https://stackify.com/learn-python-tutorials/|30个不同的Python入门网站]]
行号 6: 行号 11:
对于中文用户,特别需要关注Python的编码技术. 列举一些常用的技巧。 == 参考资料 ==
行号 8: 行号 13:
{{{
chr(i)
将一个0到255的整数转换为一个字符.
ord(c)
返回单个字符c的整数顺序值.普通字符返回[0,255]中的一个值,Unicode字符返回 [0,65535]中的一个值
unichr(i)
将一个0到65535的整数转换为一个Unicode字符
}}}
 * [[http://www.python.org/|Python Official Web]]
 * [[http://python.cn/|Python中文社区]]
 * [[http://en.wikipedia.org/wiki/Python_%28programming_language%29|Wikipedia:Python_programming_language]] ([[http://zh.wikipedia.org/wiki/Python|Wikipedia上的Python编程语言简介]])
 * [[http://docs.python.org/tut/tut.html|Python Tutorial]] (中文版: [[http://www.freebsd.org.hk/html/python/tut_tw/tut.html|Python教学文件2.0繁体中文版]] [[http://www.woodpecker.org.cn:9081/doc/Python/Py2.4tut/html/|Python指南2.4简体中文版]])
 * [[http://diveintopython.org/|Dive Into Python]] (中文版: [[http://www.woodpecker.org.cn/diveintopython/|Python研究]])
 * [[http://www.byteofpython.info/read/index.html|A Byte of Python]] (中文版: [[http://www.byteofpython.info/language/chinese/index.html|简明Python教程]])
 * [[http://docs.python.org/ref/ref.html|Python Reference Manual]] (中文版: [[http://chinesepython.org/pythonfoundry/ref2.3/tmp/|Python语言参考手册]] )
 * [[http://docs.python.org/lib/lib.html|Python Library Reference]] (中文版: [[http://chinesepython.org/pythonfoundry/lib2.3/tmp/|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://www-128.ibm.com/developerworks/cn/linux/theme/special/index.html#python|ibm上的python专题]]
 * [[http://www.ibiblio.org/obp/thinkCSpy/|How to Think Like a Computer Scientist (Learning with Python)]]
 * [[http://www.hetland.org/python/instant-hacking.php|Instant Hacking]] and [[http://hetland.org/python/instant-python.php|Instant Python]]
 * [[http://wiki.python.org/moin/Intro_to_programming_with_Python_and_Tkinter|Intro to programming with Python in Tkinter(Video Lesson)]]
 * [[http://www.honors.montana.edu/~jjc/easytut/easytut/|Non-Programmers Tutorial For Python]]
 * [[http://www.pentangle.net/python/handbook/|Handbook of the Physics Computing Course]]
 * [[http://www.onlamp.com/pub/a/python/2002/10/17/biopython.html|Beginning Python for Bioinformatics]]
 * [[http://www.pasteur.fr/recherche/unites/sis/formation/python/|Python course in Bioinformatics]]
 * [[http://www.pasteur.fr/formation/infobio/python/|Introduction to Programming using Python]]
 * [[http://www.livewires.org.uk/python/|The LiveWires Python Course]]
 * [[http://gvr.sourceforge.net/|The Guido van Robot]]
 * [[http://www.linuxjournal.com/article/3946|Python Programming for Beginners]]
 * [[http://www.rexx.com/~dkuhlman/python_101/python_101.html|Python 101 -- Introduction to Python]] [[http://www.rexx.com/~dkuhlman/python_201/python_201.html|Python 201 -- (Slightly) Advanced Python Topics]]
 * [[http://www.wag.caltech.edu/home/rpm/python_course/|Python Short Course]]
 * [[http://www.ifi.uio.no/in228/lecsplit/|Scripting for Computational Science]]
 * [[http://starship.python.net/crew/hinsen/|Python for Science]]
 * [[http://www.codeteacher.com/category.php?ID=8|Code Teacher]]
 * [[http://groups.google.com/group/comp.lang.python|Python讨论组comp.lang.python]]
 * [[http://pine.fm/LearnToProgram/|Learn to Program(ruby)]]
行号 17: 行号 42:
    * 代码中的编码设置,应该在代码最初两行内包含:
{{{
# -*- coding: UTF-8 -*-
}}}
    * 获得/设置系统的缺省编码
{{{
sys.getdefaultencoding()
行号 25: 行号 43:
sys.setdefaultencoding('utf-8')
}}}
    * 获得文件系统的文件名的编码
{{{
sys.getfilesystemencoding()
}}}
    * 获得当前终端的输入、输出编码
{{{
      sys.stdout.encoding
== 入门教程 ==
 * awesome python https://github.com/vinta/awesome-python
 * [[https://developers.google.com/edu/python|Google's Python Class]]
 * [[https://blog.jetbrains.com/blog/2020/03/05/jetbrains-academy-python/|Learn Python with JetBrains Academy!]]
 * [[http://en.wikipedia.org/wiki/Python_syntax_and_semantics|Python语法]] from Wikipedia
 * [[http://www.linuxjournal.com/article/3882|Why_Python]] by Eric Raymond [[http://wiki.woodpecker.org.cn/moin/WhyPython/WhyPythonZh|why python中文版]]
 * [[http://www.amk.ca/python/howto/advocacy/|Python_Advocacy_HOWTO]] by A.M. Kuchling
 * 另类的Python教程: [[attachment:我的名字叫Python.pdf]]
 * python 与 COM [[http://oreilly.com/catalog/pythonwin32/chapter/ch12.html|Advanced Python and COM]]
 * Using IDLE: [[attachment:idleUse05b.zip]]
 * Learning to Program: attachment: http://www.freenetpages.co.uk/hp/alan.gauld/
 * Learn To Program CD: [[attachment:LearnToProgramCD.zip]]
 * Tkinter Life Preserver: http://www.python.org/doc/life-preserver/
 * Python介绍视频[[http://video.google.com/videoplay?docid=9023849479319414382|Introducing Python]]
 * [[https://towardsdatascience.com/30-python-best-practices-tips-and-tricks-caefb9f8c5f5|30 Python Best Practices, Tips, And Tricks]]
 * [[https://docs.python-guide.org/dev/virtualenvs/|pipenv, virtual env]]
 * [[https://docs.python-guide.org/writing/gotchas/|Python Gotchas]]
== python游戏相关 ==
 * pygame: http://www.pygame.org/
 * panda3d: http://www.panda3d.org/
 * renpy: http://www.renpy.org/wiki/renpy/Home_Page
行号 35: 行号 65:
      sys.stdin.encoding
}}}
    * 编码转换(先转换为unicode,再转换为具体的编码),有两种方法:
{{{
      unicode('abc', 'mbcs').encode('utf-8')

      'abc'.decode('mbcs').encode('utf-8')
}}}

= Python库 =
 * 图像处理["PythonImageLibrary中文手册"]

 * 使用_winreg模块操纵windows注册表

 * 读取excel:用xlrd包。把excel转成csv,使用csv库操作。

学习资料
 * [http://diveintopython.org/ Dive Into Python]
 * [http://www.woodpecker.org.cn/obp/diveintopython-zh-5.4/zh-cn/dist/html/toc/index.html dive into python最新中文版]
 * [http://www.python.org/ Python官方站点]
 * [http://python.cn/ Python中文社区]
 * [http://groups.google.com/group/comp.lang.python Python讨论组comp.lang.python]
 * [http://www.ibiblio.org/obp/thinkCSpy/ How to Think Like a Computer Scientist (Learning with Python)]
 * [http://pine.fm/LearnToProgram/ Learn to Program]
 * [http://www-128.ibm.com/developerworks/cn/linux/theme/special/index.html#python]
== Python与正则表达式 ==
 * 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

Python

1. 参考资料

2. 入门教程

3. python游戏相关

4. Python与正则表达式

Python (2020-06-05 17:12:03由czk编辑)

ch3n2k.com | Copyright (c) 2004-2020 czk.