¶Á×ÄľÄñÉçÇø¡¶¿É°®µÄpython¡·
×î½ü¿´¿É°®µÄpython£¬ÀïÃæÓкܶàÒÔǰûÓÐ×¢ÒâµÄ¶«Î÷¡£ÊéÊǽèµÄ£¬ÆÚ´ýµ½2ÔÂ27ºÅ£¬ÉçÇø½â³ýͼÊ龲Ĭ¡£
ͼÊé´ó¸Å·ÖÁË3¸ö²¿·Ö¡£µÚÒ»²¿·ÖÖ÷ÒªÊDZ¾µØ±à³ÌµÄ¹ý³Ì£¬µÚ¶þ²¿·ÖÖ÷ÒªÊÇÍøÒ³±à³Ì¡£µÚÈý²¿·ÖÊÇСֽÌõ£¬
ÌṩÁ˺ܶà֪ʶµãµÄËټǡ£
ÒÔÇ°Ò²ÉϹýwoodpecker£¬ÕýÈçÍøÕ¾ÉÏдµÄ£¬È·ÊµºÜÂÒ¡£ÎÒ¾³£²»ÖªµÀ¿´ÄÄ£¬Õâ¸öÖ»Äܶà¹ä¡£ÊéÖÐÌáµ½µÄÒ»
Щ¹¤¾ßºÜºÃ£¬ÒÔǰûÌý¹ý£¬±È½Ï¸ÐÐËȤ¡£
1.Ê×ÏÈÊÇSVN£¨Subversion£©¡£Ò»¸ö°æ±¾¹ÜÀíϵͳ¡£Õâ¸ö¶Ô±à³Ì»òÕß×ö¿Æѧ¹¤×÷µÄÈË»¹ÊǺÜÓÐÓõġ£Ñø³É
±£´æ°æ±¾µÄÏ°¹ß¡£
2¡£ÊéÖÐÌáµ½µÄpythonµÄ¾«Éñ¡£KISS--keep it simple and stupid. ·ÇÒª½«pythonµÄÓ﷨ȫ²¿Ñ§ÍêÔÙÀ´ÓÃËü½â¾ö
ÎÊÌâ¾Í±¾Ä©µ¹ÖÃÁË¡£ÔÚʵսÖÐѧϰ£¬ÊÇ×îºÃµÄ·½·¨¡£ps£¬ÓÐʱºò²»ÖªµÀ¸ÃÓÃÀ´¸Éʲô£¬Ï£ÍûÄÜÓÐЩÌâÄ¿Ö®Àà
µÄÀ´×öÏ¡£ÄÇЩºÏ×÷ÏîÄ¿²»¸Ò¼ÓÈë°¡£¬ÀÏÊÇŲ»ÄÜʤÈΣ¬»¹ÐèÒª¶ÍÁ¶¡£
3¡£Ê¹ÓÃcmdÄ£¿éÀ´Ö§³ÖÃüÁîÐÐϲÙ×÷¡£
»òÕߣ¬¶ÔÓÚ¼òµ¥Çé¿öʹÓÃsys.argvÁбí¼ÓÂß¼Åжϡ£¶ÔÓÚ¸´ÔÓÇé¿öʹÓÃgetopt¡£
4.ÖÐÎıàÂë¡£Õⲿ·Ö»¹²»ÊǺܶ®¡£
5.epydocÎĵµÉú³ÉÆ÷¡£
6.ini¸ñʽÅäÖá£Ê¹ÓÃConfigParserÄ£¿é¡£
7.web¿ò¼Ü£¬Ê¹ÓÃKarrigell¡£
8¡£¶àỊ̈߳¬Ê¹ÓÃthreading, threadÄ£¿é¡£
9.wiki¿ò¼Ü£ºMoinMoin.
10.pythonÄ£¿é°²×°¹ý³Ì£ºpython setup.py install
11.socketÄ£¿éºÍurllibÄ£¿é
12.GAE¡£ Google App. Engine. ÆäÖаüº¬¿ò¼ÜDjango Web Ó¦Óÿò¼Ü¡£¹Ù·½ÍøվΪ£ºhttp://www.djangoproject.com/¡£
Ïà¹ØÎĵµ£º
zz from ¡¶¿É°®µÄPython¡·
http://www.woodpecker.org.cn/
Python±ê×¼¿â http://www.woodpecker.org.cn:9081/doc/Python/_html/PythonStandardLib/
¼òÃ÷Python½Ì³Ì http://www.woodpecker.org.cn:9081/doc/abyteofpython_cn/chinese/index.html
Python¿ìËÙ½éÉÜ http://www.zoomquiet.org/share/s5/intropy/070322-intro ......
#!/usr/bin/python
#coding=utf-8
import Image,ImageDraw,ImageFont,os,string,random,ImageFilter
def initChars():
"""
ÔÊÐíµÄ×Ö·û¼¯ºÏ£¬³õʼ¼¯ºÏΪÊý×Ö¡¢´óСд×Öĸ
usage: initChars()
param: None
return: list
·µ»ØÔÊÐíµÄ×Ö·û¼¯ºÍ
for: picCheckerÀà³õʼ×Ö·û¼¯ºÏ
todo: ......
¶íÂÞ˹·½¿éÓÎÏ·£¬Ê¹ÓÃPythonʵÏÖ£¬×ܹ²ÓÐ350+ÐдúÂ룬ʵÏÖÁ˶íÂÞ˹·½¿éÓÎÏ·µÄ»ù±¾¹¦ÄÜ£¬Í¬Ê±»á¼Ç¼Ëù»¨·Ñʱ¼ä£¬ÏûÈ¥µÄ×ÜÐÐÊý£¬ËùµÃµÄ×Ü·Ö£¬»¹°üÀ¨Ò»¸öÅÅÐаñ£¬¿ÉÒԲ鿴×î¸ß¼Ç¼¡£
ÅÅÐаñÖаüº¬Ò»ÏµÁеÄͳ¼Æ¹¦ÄÜ£¬È絥λʱ¼äÏûÈ¥µÄÐÐÊý£¬µ¥Î»Ê±¼äµÃ·ÖµÈ¡£
¸½Ô´Â룺
from Tkinter import *
from tkMessageBox import *
i ......
while µÄÓ÷¨£º
while ºóÃæ¸úÌõ¼þ±í´ïʽ£¬(:)ºóÃæ¸úÓï¾ä¿é£¬Äã¿ÉÒÔÔÚÕâ¶ÎÓï¾ä¿éÀïÐÞ¸ÄÌõ¼þ±í´ïʽµÄijЩ±äÁ¿£¬µ±Ìõ¼þ±í´ïʽ Ϊ¼ÙµÄʱºòÍ˳öÑ»·¡£ÀýÈ磺
flag = 5
while flag > 0:
#ÕâÀïÊÇÄãµÄ´úÂë
flag -= 1
#if flag == 3: break
#if flag == 3: continue
print flag
µ±È»ÄãÒ²¿ÉÒÔÔÚÊʵ ......
ÔÚÒ»¸öÏîÄ¿ÖÐÐèÒª»ñÈ¡Ëæ»úÊý£¬ËÖªµÀÓöµ½µãÎÊÌ⣺Ëæ»úÊý²»Ëæ»ú¡£ËùÒÔÎÒдÁ˸ö¼òµ¥ÔÐÍ¡£¿´Ïµ½µ×ÊÇɶÎÊÌâ¡£
import os,random,sys,time
while True:
father = os.fork()
if father:
time.sleep(2)
rd = 7
else:
#random.seed()
rd = random.choice([2,3,4,5])
......