Ò׽ؽØͼÈí¼þ¡¢µ¥Îļþ¡¢Ãâ°²×°¡¢´¿ÂÌÉ«¡¢½ö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


Ïà¹ØÎĵµ£º

ÈçºÎ·¢²¼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°æ

Õâ¸öÊÇ1.10°æ±¾µÄ²ÂÊý×Ö£¬ËäÈ»´úÂë»ù±¾²»±ä£¬µ«ÊDZäµÄÊÇ˼ά·½Ê½£¬²»ÔÙÊÇÓÃÃæÏò¹ý³ÌµÄ·½·¨£¬¶ø¸ÃΪÓÃÀàÀ´ÊµÏÖ£¬±È½ÏÇ°ºóµÄ´úÂ룬ÕâÒ»¸ö¼ò½à¶àÁË£¬¶øÇÒ¸üÈÝÒ×Àí½â£¡
¸üУº
#1.0°æ±¾ÖеÄÌáʾÀàÐÍÊÇ£ºAABB£¬¼òµ¥µÄ˵¾ÍÊÇÏà¶ÔλÖõÄÊý×Ö¶ÔÁ˾ÍÏÔʾA£¬´íÁ˾ÍÏÔʾB£»
#ÏÖÔÚµÄÌáʾ¸ÄΪ£º0A4B¸ñʽ£¬Ò²¾ÍÊÇ˵²»ÌáʾÄǸöλÖõÄÊý× ......

python ÖÐʹÓÃparamiko¼òµ¥Á¬½Ó

ÔÚparamikoÖÐʹÓÃÓû§ÃûºÍÃÜÂëͨ¹ýsftp´«ÊäÎļþ£¬²»Ê¹ÓÃkeyÎļþ¡£
import getpass
import select
import socket
import traceback
import paramiko
def putfile():
#import interactive
# setup logging
paramiko.util.log_to_file('demo.log')
username = username
hostname = hostname
......

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 ×Ö·û´®ºÍdatetimeת»»

       ΪÁË´Ó×Ö·û´®ÖÐÌáȡʱ¼ä£¬²¢½øÐбȽϣ¬Òò´ËÓÐÁËÕâ¸öÎÊÌ⣬ÈçºÎ½«×Ö·û´®×ª»»³ÉdatetimeÀàÐÍ
       1.×Ö·û´®ÓëtimeÀàÐ͵Äת»»
>>> import time
>>> timestr = "time2009-12-14"
>>> t = time.strptime(timest ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ