pythonÖÐÎÄĿ¼
ÈçÓÐһ·¾¶"e:/software/²âÊÔ.txt"
ÐèҪͨ¹ýpyhon¶Á/д "²âÊÔ.txt"Îļþ£¬¿ÉÒÔ²ÉÓÃÏÂÃæµÄ·½·¨£º
ipath = "e:/software/²âÊÔ.txt"
uipath = unicode(ipath , "utf8")
È»ºóÓÃ"uipath"¾¹ý±àÂëºóµÄ·¾¶È¥open()¼´¿É¡£
ÏÂÃæÊÇÎÒÔÚÏîÄ¿ÖÐÓÃpython¶ÁдexcelµÄÒ»µãÌå»á(½â¾öÁ˶ÁÖÐÎÄÎļþÃûÎÊÌ⣬ÆäʵÖÐÎÄĿ¼·¾¶Ò²Ò»Ñù)£º
def transExcel( inPath ) :
excelApp = Dispatch("Excel.Application")
inWorkbooks = excelApp.Workbooks.Open( unicode( inPath, "utf8" ) )
#²âÊÔÏÂinWorkbooksÕâ¸ö¶«¶«ÓеØַô£¿
print "transExcel...",inWorkbooks
transExcel("e:/software/²âÊÔ.xls")
Ïà¹ØÎĵµ£º
ÓÉsubprocess´´½¨Ò»¸ö½ø³Ì£¬È»ºó½øÐмàÊÓ
ÿһÃëÖӲ鿴һ´Î£¬Èç¹ûÕýÔÚÔËÐУ¬´òÓ¡pidºÍrunning£¬Èç¹ûÒÑÍ£Ö¹£¬,¼ÌÐøÖ´ÐÐÈÎÎñ²¢´òÓ¡Termined
shellºÍstdout¾ùÉèÖÃΪFalse
Ò²ÐíÕâ¶Ô×ö²¡¶¾µÄÊØ»¤½ø³ÌºÜºÃ
#!/usr/bin/env python
import subprocess , sys , time
p=subprocess.Popen(['ping','127.0.0.1','-n','10'], she ......
http://www.ibm.com/developerworks/cn/opensource/os-cn-ecl-pydev/Á¬½ÓÕâ¸öÍøÖ·£¬²»»áÈÃÄãʧÍûµÄ¡£
PyDev ¼ò½é
2003Äê7ÔÂ16ÈÕ£¬ÒÔ Fabio Zadrozny ΪÊ×µÄÈýÈË¿ª·¢Ð¡×éÔÚÈ«Çò×î´óµÄ¿ª·ÅÔ´´úÂëÈí¼þ¿ª·¢Æ½Ì¨ºÍ²Ö¿â SourceForge ÉÏ×¢²áÁËÒ»¿îеÄÏîÄ¿£¬¸ÃÏîĿʵÏÖÁËÒ»¸ö¹¦ÄÜÇ¿´óµÄ Eclipse²å¼þ£¬Óû§¿ÉÒÔÍêÈ«ÀûÓà Eclipse À ......
Ò»°ã°²×°µÄ¶¼ÊÇPython22°æ£¬wincvs1.3ÐèÒªpython2.1°æ±¾¼°ÒÔÉÏ¡£µ«ÊÇÆô¶¯¹ý³ÌÕÒ²»µ½£¬ÍøÉÏËÑË÷µÄ·½·¨²»´óÊÊÓá£×îºó¾¹ýÊÔÑé·¢ÏÖ£¬°ÑPython22°²×°Â·¾¶ÏµÄpython22.dll¿½±´µ½wincvsµÄ°²×°Ä¿Â¼Ï¡£ÔËÐÐwincvs£¬ok¡£¾õµÃÕâ¸ö·½·¨ºÃÓõĸø¶¥Ï£¡ ......
ÔÚPythonÖÐÓÐÒ»¸ö·Ç³£ÖØÒªÒ²·Ç³£ºÃÓõÄÄ£¿ére£¬ÔÚimport reºó£¬¾ÍÄܹ»ÔÚPythonÖÐʹÓÃÕýÔò±í´ïʽ£¬Ô´ÓÚ´Ë´ÎÏîÄ¿ÒªÓÃÕýÔò±í´ïʽ¶Ôhtml´úÂëÌáÈ¡Ò»¶¨µÄ×Ö·û£¬ËùÒÔÔÚÕâÒ²¾ÍÓÃЩСÀý×ÓÀ´ÊìϤһÏÂÕýÔò±í´ïʽ
ÏÖÔÚ¾ÍÓÃ×î¼òµ¥µÄÀý×Ó
import re
s='<title>http://www.baidu.com</title>'
print re.findall(r'&l ......
×î½üÒªÓõ½´®¿ÚͨѶ£¬¼òµ¥Ò×ÓõÄPythonÓÖ°ïÉÏæÁË£¬¶à¿÷ÁËÅÓ´óµÄµÚÈý·½×ÊÔ´~~~ £º£©
pySerial
Overview
This module encapsulates the access for the serial port. It provides
backends for Python running on Windows, Linux, BSD (possibly any POSIX
compliant system), Jython and IronPython (.NET and M ......