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

Python Project

* PYTHON Ç÷ÏòÓÚ½«¹¦ÄÜÏà½üµÄ¶ÔÏó·Å½øÒ»¸öMODULE£¨Îļþ£©À²»Óõ£ÐĶÔÏó»áÌ«´ó£¬ÒòΪÈç¹û¶ÔÏóÌ«´óÁË£¬ÄÇËü¿ÉÄÜÊÇ×öµÄÊÂÐÔÌ«¶àÁË
   ÐèÒª±»Öع¹¡¢·Ö½â¡£
* ¿ª·¢¸¨Öú¹¤¾ßÊÇPYTHONµÄÒ»¸öÇ¿Ïî¡£Èç¹¹½¨¹¤¾ß¡¢Í³¼Æ¹¤¾ßµÈµÈ£¬Ö»ÒªÓÐÐèÇó£¬ËüÒ»¶¨°ìµÃµ½£¬ÒòΪÕâЩӦÓö԰²È«ºÍÐÔÄÜÒªÇ󲻸ߣ¬·´
   ¶ø¶Ô¿ª·¢µÄ¼ò½àÐÔÓÐºÜ¸ßµÄÆòÇó¡£
* Ö»°Ñ»á·¢ÉúÒâÍâµÄÄÇһС²¿·Ö·Å½øtryÀ°Ñtry³É¹¦ºóµÄ²Ù×÷·Å½øelseÀtryʧ°ÜºóµÄ²Ù×÷·Å½øexceptÀ°Ñ²»¹Ü³É¹¦»òʧ°Ü¶¼ÐèÒªµÄ²Ù×÷
   ·Å½øfinallyÀΪʲô²»Ð´ÔÚtry-catch¿éºóÄØ£¿ÒòΪÕâ¸ötry-catch¿é´ú±íÒ»¸ö·çÏÕ²Ù×÷¼¯ºÏµÄÓïÒ⣩
* PYTHONÖпÉÒÔ¼ò»¯²Ù×÷µÄÄÚÖÃÓï·¨ÓУºfor/else(Èç¹ûfor¼¯ºÏΪ¿ÕÔòÖ´ÐÐelseÓï¾ä£©
Python ÊÇGoogleµÄ3¸ö¹Ù·½ÓïÑÔÖ®Ò»£¬ÔÚGoogleµÄÓ¦Óÿª·¢ÖдóÁ¿Ó¦Ó㬲»¹ý£¬¸ü¶àµÄÊÇÓ¦ÓÃÔÚ¿ª·¢¸¨Öú¹¤¾ßÉÏ£º
 £ª The Google build system.All of Google's corporate code is checked into a repository and the dependency and building of this           code is managed by python.Greg mentioned that to create code.google.com took about 100 lines of python code.  But since it          has so many dependencies,the build system generated a 3 megabyte 
 £ª Packaging.  Google has an internal packaging format like RPM.  These packages are created using python.
 £ª Binary Data Pusher.  This is the area where Alex Martelli is working, on optimizing pushing bits between thousands of servers
 £ª Production servers.  All monitoring, restarting and data collection functionality is done with python
 £ª Reporting.  Logs are analyzed and reports are generated using Python.
 £ª A few services including code.google.com and google groups.  Most other front ends are in C++ (google.com) and Java (gmail).        All web services are built on top of a highly optimizing http server wrapped with SWIG.
##########################################################
Python doesn't force you into Java's nasty one-c


Ïà¹ØÎĵµ£º

Python ¿½±´¶ÔÏó£¨É±´deepcopyÓëdz¿½±´copy£©

>>> import copy
>>> a = [1,2,3,4,['a','v']]
>>> b = a
>>> b
[1, 2, 3, 4, ['a', 'v']]
>>> c = copy.copy(a)
>>> c
[1, 2, 3, 4, ['a', 'v']]
>>> d = copy.deepcopy(a)
>>> d
[1, 2, 3, 4, ['a', 'v']]
>>> a.append(5) ......

ÈçºÎ·¢²¼vcµ÷ÓÃPythonµÄ¶ÀÁ¢ÔËÐеijÌÐò

±àÒëPython½Å±¾Éú³É¿ÉÖ´ÐгÌÐò£¬¿ÉÒÔͨ¹ýpy2exe±àÒëÍê³É¡£
ÔÚVCÖе÷ÓÃpythonʱ£¬¿ÉÒÔ½áºÏpy2exe£¬Íê³ÉÕû¸ö³ÌÐòµÄ¶ÀÁ¢·¢²¼^_^
google.py:
#! /usr/bin/env python
import sys, webbrowser
def main(a):
    url = "http://www.google.com/search?q=%s" % a
    webbrowser.o ......

python¼òµ¥µÄ¿ÉÄæ¼ÓÃܳÌÐò

¼òµ¥¼ÓÃÜ£¬ÓÃpythonÀ´Ð´Ð´¡£
#coding=utf-8
'''
Description: ¿ÉÄæµÄ¼ÓÃÜÓë½âÃÜ
Environment: python2.5.x
Author:idehong@gmail.com
'''
import os
import sys
class Code(object):
'''¿ÉÄæµÄ¼ÓÃÜÓë½âÃÜ'''

def __init__(self, key = "idehong@gmail.com"):
self.__src_key ......

python ¶ÁдExcelÎļþ

http://sourceforge.net/projects/pyexcelerator/
12ÔÂ2ÈÕ
python ¶ÁдExcelÎļþ£¨×ªÌû limodou£©
http://www.lexicon.net/sjmachin/xlrd.htm
Õâ¸ö°üÊÇÓÃÀ´¶ÁExcelÎļþµÄ
ÔÚ·¢ÏÖ xlrd Ö®ºó²»¾Ã¾Í·¢ÏÖÁË pyExcelerator
£¬ËüÓë xlrd ²»Í¬£¬ËüÖ÷ÒªÊÇÓÃÀ´Ð´ Excel Îļþ£¬µ±È»¶ÁÒ²ÊÇûÓÐÎÊÌâµÄ¡£ÏÂÃæ¾ÍËüµÄʹÓüòµ¥µØ½éÉ ......

ʹÓÃpy2exe´ò°üpython½Å±¾£¨except 2.6£©

Ò»¡¢¼ò½é
py2exeÊÇÒ»¸ö½«python½Å±¾×ª»»³ÉwindowsÉϵĿɶÀÁ¢Ö´ÐеĿÉÖ´ÐгÌÐò(*.exe)µÄ¹¤¾ß£¬ÕâÑù£¬Äã¾Í¿ÉÒÔ²»ÓÃ×°python¶øÔÚwindowsϵͳÉÏÔËÐÐÕâ¸ö¿ÉÖ´ÐгÌÐò¡£
py2exeÒѾ­±»ÓÃÓÚ´´½¨wxPython,Tkinter,Pmw,PyGTK,pygame,win32com clientºÍserver,ºÍÆäËüµÄ¶ÀÁ¢³ÌÐò¡£py2exeÊÇ·¢²¼ÔÚ¿ªÔ´Ðí¿É֤ϵġ£
¶þ¡¢°²×°py2exe ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØÍ¼ | ¸ÓICP±¸09004571ºÅ