¶¯Ì¬´ó±ÈÆ´Python¡¢LuaºÍRuby
ÀµÓºÆ(http://blog.csdn.net/lanphaday) Òë
ÒëÕß°´£ºPython¡¢luaºÍrubyÔÚC/C++ÊÇÈÕ½¥Ê½Î¢µÄÇé¿öÏ£¬ÔÚjava/.netµÄΧ¼ßÖÐŬÁ¦¿¹ÕùµÄÈý¸öµ±ºìСÉú¡£ÔÚTom GutschmidtµÄÖø×÷¡¶Game Programmng with Python, Lua and Ruby¡·Ò»ÊéÖУ¬½éÉÜÁËÈýÖÖÓïÑÔÔÚÓÎÏ·ÖеÄÓ¦Óã¬ÆäÖÐÓÈΪÁ˲»ÆðµÄÊÇÔÚÊéÖÐ×îºóÒ»ÕÂÖбȽÏÁËÈýÖֽű¾£¬×÷ÕßûÓÐ˵ÊëÓÅÊëÁÓ£¬µ«ÊǶÁÕßÄãÈÏΪÄØ£¿»¶ÓÁôÑÔÌÖÂÛ¡£
So which of the three languages is the best to use on your project? That depends a great deal on what you want to accomplish. To wrap up the book, I've outlined some of the pros and cons of each language in this section.
ÕâÈýÖÖÓïÑÔÖеÄÄÄÒ»ÖÖ¸üºÏÊÊÄãµÄÏîÄ¿£¿ºÜ´ó³Ì¶ÈÈ¡¾öÓÚÄãÏë´ïµ½Ê²Ã´ÑùµÄÄ¿±ê¡£×÷ΪһÊéµÄ½á⣬ÔÚÕâÒ»½ÚÀÎÒ»áÃèÊöÒ»ÏÂËüÃǸ÷×ÔµÄÓŵãºÍ²»×ã¡£
Python Pros and Cons
PythonµÄÓŵãºÍ²»×ã
The pros of Python are as follows:
PythonµÄÓŵãÈçÏ£º
· Python has more extension modules than the other languages.
· Python±ÈÆäËüÓïÑÔÓиü¶àÀ©Õ¹Ä£¿é¡£
· Many online Python tutorials exist. There are also plenty of English books and reference materials, many sample scripts exist online, and there is a wealth of introductory material. The Python.org Website is a good place to start looking for these because it has sections for beginners, tutorials, guides organized by topic, and lists of links and references.
· ÔÚÍøÉÏ¿ÉÒÔÕÒµ½ºÜ¶àPython½Ì³Ì¡£²»½öÈç´Ë£¬»¹ÓдóÁ¿µÄÓ¢ÎÄÊé¼®ºÍ×ÊÁÏ¡£Python.orgÓкܶàΪ³õѧÕß×¼±¸µÄÒÀÖ÷Ìâ×éÖ¯µÄ×ÊÁÏ¡¢½Ì³ÌºÍ±à³ÌÖ¸ÄÏ£¬´ËÍ⻹ÓкܶàÁ´½ÓºÍ²Î¿¼¡£
· Most folks really enjoy the syntax of the Python language because it appears clean and is easy to read.
· ºÜ¶àÈ˶¼Ï²»¶PythonÓïÑÔµÄÓï·¨£¬ÒòΪËüÇåÎúÒ׶Á¡£
· Python has an edge wher
Ïà¹ØÎĵµ£º
1.ÁбíµÄµÝ¹é---ÓÃÓÚÊä³öÁбí×Ö·û´®ÖеÄÿ¸öÔªËØ >>> def printList(L):
#Èç¹ûΪ¿Õ£¬Ôòʲô¶¼²»×ö
if not L:
return
#Èç¹ûÊÇÁ´±í£¬Ôò¶ÔµÚÒ»¸öÔªËص÷ÓÃprintListº¯Êý
& ......
ÏÂÔصÄPDFÎĵµÖÐÓеÄÃüÃûºÜÂÒ£¬¾ÍÏëÆðÁË×Ô¼ºÐ´¸ö³ÌÐò£¬È»ºó¶ÁÈ¡PDFµÄtitleÊôxing£¬¸ù¾ÝÕâ¸öÊôxing£¬¸ü¸Ä´ÎÎĵµµÄÃû×Ö£¡ÒÔÏÂÊÇ´úÂ룺
ÐèÒªµ½£ºhttp://pybrary.net/pyPdf/ÉÏÃæÏÂÔضÔӦƽ̨µÄPDFµÄ¿âÎļþ£¬È»ºó°²×°£¬µ¼Èë¡£
#encoding:utf-8
import os
import operator
from pyPdf import PdfFileWriter, PdfFileReader ......
http://cocobear.info/blog/2009/01/16/use-python-deal-with-excel/
ʹÓÃPython´¦ÀíExcel±í¸ñ 2009Äê01ÔÂ16ÈÕ
¸ø°³µÄbossдµÄÒ»¸öС¹¤¾ß£¬Ê¹ÓÃPython¶ÔExcel½øÐÐͳ¼Æ£¬È»ºó°Ñ½áÊøÉú³ÉÒ»¸öеÄExcel±í¸ñ£¬Ê¹Óõ½ÁËxlrdºÍpyExceleratorÁ½¸ö¿â¡£
¼òµ¥µÄ½éÉÜÒ»ÏÂÕâÁ½¸ö¿â£¬ÏÈ˵xlrd£¬Õâ¸ö¿â¶ÁExcel±È½Ï·½±ã£¬¸÷ÖÖ·½·¨Ê¹ÓÃÆ ......
python µÄÄÚǶtimeÄ£°å·Ò뼰˵Ã÷
Ò»¡¢¼ò½é
timeÄ£¿éÌṩ¸÷ÖÖ²Ù×÷ʱ¼äµÄº¯Êý
˵Ã÷£ºÒ»°ãÓÐÁ½ÖÖ±íʾʱ¼äµÄ·½Ê½:
µÚÒ»ÖÖÊÇʱ¼ä´ÁµÄ·½Ê½(Ïà¶ÔÓÚ1970.1.1 00:00:00ÒÔÃë¼ÆËãµÄÆ«ÒÆÁ¿),ʱ¼ä´ÁÊÇΩһµÄ
µÚ¶þÖÖÒÔÊý× ......
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 ......