Ò׽ؽØͼÈí¼þ¡¢µ¥Îļþ¡¢Ãâ°²×°¡¢´¿ÂÌÉ«¡¢½ö160KB

python Ö® pilÉú³ÉÑéÖ¤ÂëͼƬ

#!/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: Nothing
"""
nums = [str(i) for i in range(10)]
letterCase = [
'a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'j', 'k',
'm', 'n', 'p', 'q', 'r', 's', 't', 'u', 'v',
'w', 'x', 'y'
]
upperCase = [
'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'J', 'K',
'M', 'N', 'P', 'Q', 'R', 'S', 'T', 'U', 'V',
'W', 'X', 'Y'
]
return(nums+letterCase+upperCase)

class picChecker():
"""
ͼƬÑéÖ¤´úÂ룺
1) Óû§×¢²áÐèÌîдͼƬÑéÖ¤Â룬ÒÔ×èÖ¹»úÆ÷ÈË×¢²á
2) ͼƬÑéÖ¤Âë×Ö·ûÊýΪ 4 λ(´óСд×ÖĸÓëÊý×Ö£¬²»Çø·Ö´óСд)¡£
Óû§Èç¹ûûÓÐÌîдÑéÖ¤Âë»òûÓÐÌîдÕýÈ·µÄÑéÖ¤Â룬
Ò³ÃæÓѺÃÐÔÌáʾÓû§Ìîд(ͬʱ³ÌÐò·½ÃæÒ²×öÏàÓ¦ÏÞÖÆ)
usage: pc = picChecker().createChecker()
param: ºÜ¶à£¬ÈçÏÂ
chars ÔÊÐíµÄ×Ö·û¼¯ºÏ£¬
ÀàÐÍ list
ĬÈÏÖµ initChars()
Àý×Ó ['1','2','3']
length ×Ö·û´®³¤¶È
ÀàÐÍ integer
ĬÈÏÖµ 4
size ͼƬ´óС
ÀàÐÍ tutle
ĬÈÏÖµ (120,30)
Àý×Ó (120,30)
fontsize ×ÖÌå´óС
ÀàÐÍ integer
ĬÈÏÖµ 25
begin ×Ö·ûÆäʵλÖ㬼´×óÉϽÇλÖÃ
ÀàÐÍ tutle
ĬÈÏÖµ (5,-2)
outputType Êä³öÀàÐÍ
ÀàÐÍ string
ĬÈÏÖµ GIF
¿ÉÑ¡Öµ GIF JPEG TIFF PNG
mode ͼƬģʽ
ÀàÐÍ string
¿ÉÑ¡Öµ RGB L (»¹ÓÐÆäËûģʽ£¬µ«Ö»ÍƼöÕâ2ÖÖ)
ĬÈÏÖµ RGB
backgroundColor ±³¾°É«
foregroundColor Ç°¾°É«
µ±mode=RGBʱ£¬backgroundColor,foregroundColorΪtutleÀàÐÍ
ȡֵΪ(integer,integer,integer)
±íʾRGBÑÕÉ«Öµ
µ±mode=Lʱ£¬backgroundColor,foregroundColorΪÊý×Ö£¬±íʾºÚ°×ģʽ
ȡֵΪ0-255
±íʾ»Ò¶È
fonttype ×ÖÌå·¾¶
ÀàÐÍ string
ĬÈÏÖµ "simsum.ttc"
jamNum ¸ÉÈÅÏßÌõÊý
ÀàÐÍ (int1,int1)
int1 ¸ÉÈÅÏßÌõÊýÏÂÏÞ£¬°üº¬
int2 ¸ÉÈÅÏßÌõÊý


Ïà¹ØÎĵµ£º

pythonÐÔÄÜÔöÇ¿¹¤¾ßshedskin 0.3°æ·¢²¼

http://code.google.com/p/shedskin/ Shed Skin 0.3 - support for 3 new standard library modules (now about 20 in total): - itertools (jeremie roquet) - heapq (jeremie roquet) - csv (converted using shedskin) - 4 new example programs (now 44 in total!): - maximum weighted matching al ......

×Ô¶¯½âѹ´óÁ¿Ñ¹ËõÎļþ Python ½Å±¾

֮ǰдÁËÒ»¸ö×Ô¶¯½âѹѹËõÎļþµ½Ñ¹ËõÎļþËùÔÚÎļþ¼ÐµÄ½Å±¾
ºó¸ù¾Ý×Ô¼ºÐèÒª£¬Ð´ÁËÁíÍâÁ½¸ö¡£Ô­ÀíÒ»Ñù
¶¼ÊÇʹÓÃwinrarµÄÃüÁî
µÚÒ»¸ö½Å±¾Ã»¿¼ÂÇÖܵ½£¬Ö»ÄܽâѹrarÎļþ
¸Ä½øºó¿ÉÒÔÖ§³ÖwinrarÖ§³ÖµÄ¸÷ÖÖÎļþ
°ÑÖ¸¶¨Îļþ¼ÐϵÄÎļþ±£´æµ½Ö¸¶¨Îļþ¼Ð
#rardir.py
import os
import sys
src=sys.argv[1]
dst=sys.argv[2]
......

Python or Ruby

http://blog.csdn.net/myan/archive/2008/01/07/2028545.aspx
http://blog.csdn.net/gashero/archive/2007/06/03/1636030.aspx
 
ÎҸоõ»¹ÊÇpythonÓ¦Óøü¹ãһЩ£¬RubyµÄRoR×öWeb¿ò¼ÜºÃһЩ°É£¬ÖÁÓÚperl£¬ÏÖÔڸоõʵÔÚÓм¸·Ö¿àɬ…… ......

PythonºÍRubyµÄ¶Ô±È£¬¾ÀÕýһЩÎó½â

PythonºÍRubyµÄ¶Ô±È£¬¾ÀÕýһЩÎó½â
ÏÂÃæÊÇÎÒÔÚ¿´Á½Æª¹ØÓÚPythonºÍRuby¶Ô±ÈµÄÎÄÕÂʱ£¬Ëù×÷µÄ¾ÀÕý£¬Ô­ÎĶ¼Êǹ㷺Á÷Ðеģ¬±È½ÏºÃÕÒ¡£
------------------------------------------------------
¡¶rubyºÍpythonµÄ±È½Ï¡·¸üÕýÒ»µãÊÂÇé
1¡¢Îĵµ¡¢¿ªÔ´ÏîÄ¿¡¢¿âÖ§³Ö£¬ÕâЩ¶«Î÷Ruby²»Òª¸úPython±È£¬²»ÊǼ¸¸öÊýÁ¿¼¶µÄÎÊÌ⣬ºÎ±ØÃ²Ë ......

ÅäÖÃvim Ìá¸ß±àдpython½Å±¾µÄЧÂÊ

ʹÓÃpython.vimʹpython´úÂë¸ßÁÁ
http://www.vim.org/scripts/script.php?script_id=790
ʹÓÃ
Pydiction²å¼þʹvimÔö¼Ótab´úÂëÌáʾ¹¦ÄÜ
http://www.vim.org/scripts/script.php?script_id=850
¾ßÌå°²×°·½·¨¿ÉÒÔ²ÎÕÕ°ïÖú»òÕßREADME£¬ÒòΪ°æ±¾±ä»¯»áµ¼Ö°²×°·½·¨ÉϲúÉú²îÒì
±à¼­~/.vimrcÎļþÔö¼ÓÏÂÃæÑ¡Ïî
set nu Ôö¼ÓÐÐ ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ