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

python²éÕÒÖÐÎÄ×Ö·û

#filename Seek.py
import unicodedata
import sys
import os
class Seek():
    """
    ¹¦ÄÜ:²éÕÒÖÐÎÄ,²¢Ìæ»»³ÉÖ¸¶¨×Ö·û»ò×Ö·û´®
    ʹÓ÷½·¨:python½Å±¾Ó÷¨
    ²ÎÊý˵Ã÷:
        -d    : ÎļþĿ¼(¾ø¶Ô»òÏà¶Ô·¾¶)(ĬÈÏΪ½Å±¾ËùÔÚĿ¼)
        -t    : ÎļþÀàÐÍ(ÎļþÃûºó׺,Èç.jsp;.txt)(ĬÈÏΪËùÓÐÎļþ)
        -sf   : ÊÇ·ñ°üÀ¨×ÓĿ¼(Y|N)(option,ĬÈϲ»°üÀ¨×ÓĿ¼)
        -r    : Êä³öÎļþÃû(option,ĬÈÏΪ'ChineseCharacter.txt'),λÓڽű¾Ä¿Â¼ÏÂ
        -encoding:Îļþ×Ö·û±àÂë(ĬÈÏΪutf-8)
    """
       
    def __init__(self):
        """
        ³õʼ»¯²éÕÒ³ÌÐò
        ²ÎÊý½âÎö
        """
        #TODO:
        self.d = '.'
        self.sf = 'N'
        self.t = 'ALL'
        self.r = 'ChineseCharacter.txt'
        self.encoding = 'utf-8'
        varL = 0
        for ar in sys.argv:
            if ar == '-d':
                self.d = sys.argv[varL+1]
                continue
    &


Ïà¹ØÎĵµ£º

pythonдµÄ½«Ò»Ð©ÀàÐ͵ÄÎļþѹËõΪ7z¸ñʽ

#½«Ò»Ð©ÀàÐ͵ÄÎļþѹËõΪ7z.py
#for folder all file do 7z
import os
import sys
import distutils.file_util
def ImportOkFile():
    if(os.path.isfile("D:\\Records\\½«Ò»Ð©ÀàÐ͵ÄÎļþѹËõΪ7z_record.txt")==False):
        f=open("D:\\Reco ......

python ¶ÁhttpС¼Ç

conn = httplib.HTTPConnection(EPG_IP + ":" + HTTP_PORT)
url = FAV_URL_PARTH +"userid=" + USER_ID + FAV_DIR_MODIFY
param = '''<ps100request id="Favorite.Category.modify">
<categoryid>'''+categoryid+'''</categoryid>
<categoryname>'''+categoryname+'''</ ......

¼ò»¯Python½âÊÍ»·¾³µÄ°²×°

ÎÊÌâÃèÊö
ÔÚC++ºÍPython»ìºÏ±à³ÌÖУ¬ÔÚÈí¼þ·¢²¼µÄʱºòÐèÒª½«pythonµÄ½âÊÍÆ÷´ò°üµ½°²×°³ÌÐòÖУ¬ÎªÁËÌá¸ßÓû§ÌåÑ飬ÎÒÃÇÐèÒªÈÃÓû§¸Ð¾õ²»µ½pythonµÄ°²×°£¬Èç¹ûÓû§ÒѾ­°²×°ÓÐpythonµÄ»·¾³£¬ÎÒÃÇÒ²Òª±£Ö¤²»Ó°ÏìÏÖÓеÄϵͳ¡£
½â¾ö·½°¸
ÔÚPython2.5ÒÔºó£¬pythonÖ§³Ö´ÓzipÎļþÖжÁÈ¡python½Å±¾Îļþ£¬Ö§³Ö¶ÁÈ¡py£¬pyc£¬pyo£¬²»Ö ......

PythonͨѶ²¾

ÕâÁ½ÌìÔÚѧϰpythonÓïÑÔ£¬Ò²Ñ§×ÅдÁ˸öͨѶ²¾£¬Á·Ï°ÈëÃÅÏ£¡
¹¦ÄÜ°üÀ¨ÒÔÏ£º
1¡¢Ôö¼ÓÒ»Ìõ¼Ç¼
2¡¢É¾³ýÒ»Ìõ¼Ç¼
3¡¢ÐÞ¸ÄÒ»Ìõ¼Ç¼
4¡¢²éѯһÌõ¼Ç¼
5¡¢ÏÔʾÕû¸öͨѶ²¾
6¡¢°ïÖúÌáʾ
7¡¢°æ±¾ÏÔʾ
8¡¢Í˳öµÈ
Ê×ÏȽ¨Á¢Ò»¸öPersonÀ࣬¼´Person.pyÎļþ£¬ÓÃÀ´±£´æÁªÏµÈ˼Ǽ£º
class Person:
def __init__(self, nam ......

python pop3 ÊÕÓʼþ

def retrive_emails(pop3_server, user_name, passwd, server_port):
    #POP3
    pop_client = poplib.POP3(pop3_server, port=server_port)
    pop_client.user(user_name)
    pop_client.pass_(passwd)
   
    ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ