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

»°ËµPython£¨Ò»£©

С°×ºÍС²ËÊÇ´óѧͬѧ£¬Õâ²»¿ìÒª±ÏÒµÁË£¬Á©ÈËÒ»ºÏ¼Æ£¬ÕÒ¸öÅàѵ°àѧµã¶«Î÷£¬Îä×°Ò»ÏÂÍ·ÄÔ£¬Ë³±ã½â¾ö¾ÍÒµÎÊÌâ¡£
“ÄãÃÇÒª±¨Äĸö°à°¡£¿”½Ó´ýËûÃǵÄÄêÇáС½ãÈÈÐĵØÎʵÀ¡£
“ÄãÃÇÕâÀïÄĸö°à×îºÃ£¿”С°×²»¼Ù˼Ë÷µØ˵£¬“µ±È»ÊDZ¨×îºÃµÄ°àÀ²¡£”
“ÎÒÃǹ«Ë¾µÄÅàѵÏîÄ¿¶¼ºÜºÃ”С½ãЦµÀ£¬“²»¹ýC++ºÍJavaµÄÅàѵ°à×î»ðÁË£¬C++ÓÐMFC¡¢.Net·½Ïò£¬JavaÓÐSpring¡¢Hibernate……”¡£
“»¹ÓÐûÓбðµÄ£¿”С²Ë´ò¶ÏÁËËýµÄ»°£¬“¼òµ¥µãµÄ£¬ºÙºÙ¡£”
С½ã·­ÁË·­×ÀÍ·µÄÎļþ£¬»Ø´ðµÀ£º“Ŷ£¬Óа¡¡£ÎÒÃǹ«Ë¾Ð¿ªÁËÒ»¸öPythonÅàѵ°à£¬ÎÒ¸øÄãÃÇ¿´Ò»Ï½éÉÜ¡£”˵×Å£¬Ð¡½ã½«²ÄÁϽ»¸øÁ½ÈË¡£
“Google  BitTorrent  Nokia”С°×¶Á×ÅÒ»¸ö¸ö¶úÊìµÄÃû×Ö£¬ÑÛ¾¦ÕöµÃ´ó´óµÄ¡£
“¼òµ¥µÄÓïÑÔ£¬Óï·¨±í´ïÓÅÃÀÒ׶Á”£¬Ð¡²ËÄî×ÅÕâЩ£¬Ëƺõ·Â·ðÕÒµ½ÁËÖª¼º¡£
 
ÕâÑù£¬°×²Ë¶þÈË×éÀ´µ½ÁËPythonµÄ¿ÎÌá£
 
ÊڿεÄÀÏʦÃû½Ð´óÅ££¬ÓµÓÐ5ÄêµÄPython±à³Ì¾­Ñ飬ͬʱ¾«Í¨C/C++ºÍÍøÂç±à³Ì¡£
Hello World£¡
ÈÃÎÒÃÇ¿´¿´PythonÈçºÎʵÏÖµÚÒ»¸öÀý³Ì¡£
´Ó“¿ªÊ¼”->“³ÌÐò”ÀïÔËÐÐPython IDLE£¨ÕâÊÇPythonÄÚÖõÄIDE£©£¬»á³öÏÖÒ»¸öShell£¬ÓÐÈçÏÂÐÅÏ¢£º
Python 3.1.2 (r312:79149, Mar 21 2010, 00:41:52) [MSC v.1500 32 bit (Intel)] on win32
Type "copyright", "credits" or "license()" for more information.
>>> 
 
ÔÚ >>> ºóÊäÈ룺print ("hello world!")
ÆÁÄ»»á³öÏÖ
>>> print ("hello world!")   #ÕâÊǸղÅÊäÈëµÄÄÚÈÝ
hello world!
    “ÊDz»ÊǺܼòµ¥°¡£¡”´óÅ£ÀÏʦÍê³ÉÁËÒ»¸öÖøÃûµÄ“ÏîÄ¿”£ºhello world!
“ print ("I love money!")  ²»£¬Ó¦¸ÃÊÇ print("Money love me!")”С°×Ð˷ܵØÇÃ׿üÅÌ£¬¸ù±¾Ã»ÓÐÌý¼û¡£
    “ÕâÒ²½Ð³ÌÐò£¿Æ­Ð¡º¢µÄ°É£¡”С²ËºÜ²»ÔÚºõ¡£
ÎÒÃÇÖªµÀ,ÔÚC\C++¡¢JavaÖУ¬±ØÐëÒªÓÐÈë¿Úº¯Êý£¬³ÌÐò¶¼»á´ÓÈë¿Úº¯Êý´¦¿ªÊ¼Ö´ÐУ¬µ«PythonΪʲôƫƫÕû³ÉÕâ¸öÑù×Ó£¿¿´ÆðÀ´²»ÏñÊǸö³ÌÐò°¡£¡
ÕâÖÖ»·¾³±»³Æ×÷½»»¥Ê½Shell£¬½Ó´¥¹ýLinux Shell ¡¢Matlab»òÕßWindows CMDµÄͬѧӦ¸Ã²»»áÄ°Éú¡£ÕâÖÖÐÎʽ¸ü¶àµÄÓÃÔÚ¿Æѧ¼ÆË㡢ϵͳ½Å±¾ºÍ¿ÎÌýÌѧÖС£ÔÚºóÃæµÄ¿Î³ÌÀÎ


Ïà¹ØÎĵµ£º

python²Ù×÷excel


¼ÈȻѡÔñÁËÔ¶·½£¬¾Í±ØÐëÈÕÒ¹¼æ³Ì http://wrsuifeng.javaeye.com
Python´úÂë
# Filename: excel.py   
import os,sys,time   
import win32com.client   
import traceback   
  
excel = win32com.client.Dispatch(" ......

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ÓëMicrosoft Office×Ô¶¯»¯²Ù×÷

http://www.cnblogs.com/Jedimaster/archive/2007/02/28/660209.html
¡¡¡¡ÅóÓѵļÒÈË×öÉúÒ⣬ÿÈÕ´Ó¸÷µØ·Öµê´¦ÊÕ¼¯±¨±í£¬È»ºó»ØÈ¥»ã×Ü¡£ÓÉÓÚ²»ÏëÓÃÄÇÖÖ¸´ÔӵĹÜÀíÈí¼þ£¬¾Í½ÐËûдһ¸öС¹¤¾ß¡£ÓÚÊÇËûÕÒµ½ÁËÎÒ£¬ÈÃÎÒÏëÏë°ì·¨¡£
¡¡¡¡PythonÊǸöÁîÈ˾ªÆæµÄ¹¤¾ß£¬¶ø²»½ö½öÊÇÒ»ÖÖÓïÑÔ¡£¶Ô±ÈÀÏÅƵÄPerl£¬¿´ËÆPython²»ÊÇÄÇôµÄ¾«Í¨ ......

Python ¿ªÆª

ÓÉÓÚ¹¤×÷ÐèÒª£¬ÓÖҪѧϰеĿª·¢ÓïÑÔ-Python£¬ ÓïÑÔѧ¹ý¼¸ÖÖÁË£¬ ¸Ð¾õ»¹ÊÇÓкöàÏàËƵĵط½£¬ Õâ¸öPython¸Ð¾õ¾Í¸úJavaÓкöàÏàͨµÄµØ·½£¬ Ê×ÏÈÄã¿ÉÒÔÔÚEclipseÉÏͨ¹ýÅäÖúóÀ´¿ª·¢Python¡£ÕâÀïÎÒÌý´ÓÁËÀÏ´óµÄ½¨Ò飬ÅäÖÃÁËÒ»¸öFlexBuilder ×÷ΪPythonµÄIDE½øÐпª·¢¡£
Ä¿Ç°¸Õ¿ªÊ¼Ñ§Ï°PythonµÄ»ù±¾Óï·¨£¬ ½ñÌìÖ÷Òª¿´ÁËÒ»ÏÂPyth ......

pythonµÄÒì³£Exception


Python µÄÒì³£´¦Àí»úÖÆ
Python´úÂë 
 try:    
  raise Exception("a", "b")    
    except Exception,e:    
  print e    
    finally:    
  print "final"    
('a', ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ