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

Python ¿ªÆª

ÓÉÓÚ¹¤×÷ÐèÒª£¬ÓÖҪѧϰеĿª·¢ÓïÑÔ-Python£¬ ÓïÑÔѧ¹ý¼¸ÖÖÁË£¬ ¸Ð¾õ»¹ÊÇÓкöàÏàËƵĵط½£¬ Õâ¸öPython¸Ð¾õ¾Í¸úJavaÓкöàÏàͨµÄµØ·½£¬ Ê×ÏÈÄã¿ÉÒÔÔÚEclipseÉÏͨ¹ýÅäÖúóÀ´¿ª·¢Python¡£ÕâÀïÎÒÌý´ÓÁËÀÏ´óµÄ½¨Ò飬ÅäÖÃÁËÒ»¸öFlexBuilder ×÷ΪPythonµÄIDE½øÐпª·¢¡£
Ä¿Ç°¸Õ¿ªÊ¼Ñ§Ï°PythonµÄ»ù±¾Óï·¨£¬ ½ñÌìÖ÷Òª¿´ÁËÒ»ÏÂPythonµÄÄÚÖÃÊý¾Ý±äÁ¿£º
Ôª×飺 Õâ¸öÀàËÆÓÚJavaÀïÃæµÄarrayÊý×飬 ËäȻ˵ÔÚPythonÀïÃæÒ»ÇнÔÊǶÔÏ󣬲»»áÓÐÕâÖÖÖµ±äÁ¿µÄ´æÔÚ£¬µ«ÊÇÕâÀïµÄÔª×éÓ¦¸Ã˵¿ÉÒÔ¿´×öÒ»¸öÖµ±äÁ¿£¬ ¿ÉÒÔ½øÐвéÕÒ£¨¸ù¾Ýindex£©£¬µ«ÊDz»ÄܽøÐÐÌí¼Ó¡¢É¾³ýµÄ²Ù×÷¡£»¹ÓÐÕâ¸öPythonÀïÃæµÄÔª×é´æÔÚÒ»¸öºÜÓÐÒâ˼µÄ¹¦ÄܾÍÊÇ¿ÉÒÔÓøºµÄË÷ÒýÖµ²éѯ£¬±ÈÈça¡¾-1¡¿£¬ »¹ÓоÍÊDzéѯƬ¶ÎµÈ²Ù×÷
ÁÐ±í£º Õâ¸öÓ¦¸Ã˵ÊÇÀàËÆÓÚJavaÀïÃæµÄArrayList¿ÉÒÔ½øÐвéÕÒ£¬ÅÅÐò£¬·´×ª£¬ ¿ÉÒÔʹÓÃÁбíÀ´ÊµÏÖ¶ÑÕ»¡¢¶ÓÁÐ
×ֵ䣺 ÀàËÆÓÚJavaÀïÃæHashMap£¬ ²Ù×÷Ò²ÊÇ»ù±¾ÀàËÆ£¬ ÌرðÊÇPythonÀïÒ²ÓÐJavaÀïÃæµÄÉ±´£¬Ç³¿½±´²Ù×÷£¬·Ö±ðÓÃcopy()¡¢deepcopy()ʵÏÖ¡£
pythonµÄÄ£¿éÓ뺯Êý¸úJava£¬c++Ïà²î²»´ó£¬ ±È½ÏÌرðµÄµØ·½Ö÷ÒªÓÐÁ½¸öµØ·½£º
lambda: ÀàËÆÓÚC++ÀïµÄºêº¯Êý£¬ Æä¸ñʽΪ£ºlambda var1,var2....:±í´ïʽ£¬ ÀýÈçlambda x, y: x+ y.
Generatorº¯Êý£º Ò»´Î²úÉúÒ»¸öÊý¾ÝÏ ²¢°ÑÕâ¸öÊý¾ÝÏîÊä³ö£¬generatorº¯Êý¸úÆÕͨµÄº¯ÊýûÓÐʲôÇø±ð£¬Ö»ÊÇÔÚº¯ÊýÌåÄÚÒªÓÐÒ»¸öyieldÉú³ÉÏî¼´¿É¡£yieldºÍreturnµÄ·µ»ØÖµºÍÖ´ÐÐÔ­Àí¶¼²»Í¬£¬yieldÉú³ÉÖµ²»»áÖÐÖ¹³ÌÐòµÄÖ´ÐУ¬·µ»ØÖµºó³ÌÐò¼ÌÐøÍùºóÖ´ÐУ¬return·µ»Øºó£¬³ÌÐò½«ÖÕÖ¹Ö´ÐС£
¿ªÊ¼Ñ§Ï°Ê±´æÔÚµÄÎÊÌâ¿ÉÄÜÊǶÔһЩÄÚ½¨º¯Êý²»ÊǺÜÁ˽⣬±ÈÈçsorted£¨£©¡£¡£¡£»¹ÓÐòËÆÕâ¸öPython3.0¸ú2.5µÄÓкܶ಻ͬµÄµØ·½£¬±ÈÈçprint...£¬ËùÒÔ˵Õâ¸ö¿ªÔ´µÄ¶«Î÷ÔÚ¸üа汾µÄʱºò¿¼ÂǵľÍÊÇÉÙ£¡


Ïà¹ØÎĵµ£º

²Å·¢ÏÖ Python ±»ºÍгÁË

×òÌìÔÚÑо¿Á˼¸ÌìPHP-GTKºó£¬¾ö¶¨×ªÏòPython£¬ÒòΪPython¾ßÓжàÏß³ÌÕâ¸öÌص㣬ÔÚÓëϵͳ½»»¥·½ÃæÒ²±È½ÏÓÐÓÅÊÆ£¬ËäÈ»ÎÒºÜϲ»¶PHP£¬PHPÔÚÍøÒ³·½ÃæÒ²·Ç³£Ç¿´ó£¬µ«±Ï¾¹ÎÒ²»ÊǸãÍøÕ¾¿ª·¢µÄ¡£
ÏëϸöPython°É£¬·¢ÏÖËü¾ÓÈ»±»ºÍгÁË£¬Ì«¹îÒìÁË
°¦£¬ºÍгÓÐÀí£¬ÆÁ±ÎÎÞ× ......

Pythonѧϰ±Ê¼Ç Ä£¿é£»ÎļþÓëÎı¾´¦Àí

1.PythonÖÐʱ¼äº¯ÊýÓм¸ÖÖ²»Í¬µÄ±íʾ·½·¨¡£Ò»ÖÖÊÇ»ùÓÚÊý×ֵıíʾ·½·¨£¬ÁíÍâÒ»ÖÖÊÇÓÃһϵÁÐÖµÀ´±íʾ£¬µÚÈýÖÖÊÇÓÃASCIIÂë×Ö·û´®µÄ¿É¶ÁÐÎʽÀ´±íʾµÄÔª×é¡£ time()º¯Êý·µ»ØµÄÊÇ´Óijһʱ¼äµãËãÆðµÄÃëÊý£¬¸ÃÊýÖµÊÇÒ»¸ö¸¡µãÊý¡£¸ù¾Ý²Ù×÷ϵͳµÄ²»Í¬£¬Õâ¸öʱ¼äµãÒ²²»Í¬¡£Í¨¹ýÇólocaltime(0)µÄÖµ¿ÉÒÔÕÒµ½ÏµÍ³µÄ¸Ãʱ¼äµã¡£ localtime ......

python Excel ±à³Ì

1)Excel hyperlink:
xlsApp = win32com.client.Dispatch('Excel.Application')
cell = xls.App.ActiveSheet.Cells(1,1)
cell.Hyperlink.Add(cell,'http://xxx')
2)Excel row/column count:
sht = xlsApp.ActiveSheet
sht.Columns.Areas.Count
sht.Rows.Areas.Count
*************************
£Û1£ÝʹÓÃPyExcelera ......

python timeÄ£¿éÏê½â

 python µÄÄÚǶtimeÄ£°å·­Ò뼰˵Ã÷
 
Ò»¡¢¼ò½é
  timeÄ£¿éÌṩ¸÷ÖÖ²Ù×÷ʱ¼äµÄº¯Êý
  ˵Ã÷£ºÒ»°ãÓÐÁ½ÖÖ±íʾʱ¼äµÄ·½Ê½:
       µÚÒ»ÖÖÊÇʱ¼ä´ÁµÄ·½Ê½(Ïà¶ÔÓÚ1970.1.1 00:00:00ÒÔÃë¼ÆËãµÄÆ«ÒÆÁ¿),ʱ¼ä´ÁÊÇΩһµÄ
       µÚ¶þÖÖÒÔÊý× ......

½«PythonºÍAutoHotkey½áºÏÆðÀ´

http://www.autohotkey.com/forum/topic53773.html
Q:I am searching for is a way to execute AHK commands from a Python script. Is this possible?
A:Yes. Here is an example. 
tested with python2.6, requires AutoHotkey.dll in the working directory or path... 
ahkpython.py:
#Persistent
dllc ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ