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

python ÈÕÖ¾ÎÊÌâ


ÎÒÔËÐÐһϳÌÐò£º
import logging

def initlog():

    logger = logging.getLogger()
    hdlr = logging.FileHandler('D:\log_fram.log')
    formatter = logging.Formatter('%(asctime)s %(levelname)s %(message)s')
    hdlr.setFormatter(formatter)
    logger.addHandler(hdlr)
    logger.setLevel(logging.NOTSET)

    return logger

if __name__ == "__main__":
    loger = initlog()
    loger.info("Now the come return of the king!")

²åÈëÎļþûÓÐÎÊÌ⣬µ«ÊÇΪʲôµÚÒ»´ÎÔËÐвåÈëÒ»Ìõ,µÚ¶þ´Î²åÈëÁ½Ìõ£¬µÚÈý´Î²åÈëÈýÌõ£¬ÒÔ´ËÀàÍÆ£¡
²»ÖªµÀÊÇʲôԭÒòÇëÖ¸½Ì£¡


ÊÔÁËÄãµÄ½Å±¾£¬Õý³£¶î£¬Ã¿´ÎÒ»Ìõ¡£ÎҵĻ·¾³ÊÇPython 2.6.3 for Windows XP¡£

Õâ¸úÎļþ´ò¿ªËùÓÃµÄ mode Óйأ¬Ä¬ÈÏÊÇÒÔ append ´ò¿ªµÄ

Python code:
class FileHandler( filename[, mode])

Returns a new instance of the FileHandler class. The specified file is opened and used as the stream for logging. If mode is not specified, 'a' is used. By default, the file grows indefinitely.



¼¸ÖÖÎļþµÄ´ò¿ª·½Ê½£¬Ò²Ö»ÓÐaÊʺϰ¡£¬Ä¬ÈϾÍÊÇa£¬²»Ð´Ò²Ã»ÓÐʲôÎÊÌ⣡
angel_su ˵¿ÉÒÔ£¬ÄÇÊÇʲôԭÒòÄØ£¡£¿
ÎÒÓõÄÊÇpython2.5.2&


Ïà¹ØÎÊ´ð£º

³ÏÕÐPython³ÌÐòÔ±²ÎÓë¼ÆËã»úÊé¼®³ö°æ

ÓźñµÄ¸å³ê£¬³ÏÕÐPython¼¼ÊõÈËÔ±²ÎÓë¸÷ÖÖ¼¼ÊõÊé¼®³ö°æ¡£ 
ͨ¹ý¸ÃÊé¼®£¬×÷Õß¿ÉÒԵõ½Èçϱ¨³ê£º 
1¡¢·áºñµÄ¸å³ê¡£ 
2¡¢Êé¼®Öø×÷µÄÊðÃûȨ¡£ 
3¡¢¶Ô×÷ÕߺÍÊé½øÐÐÐû´«£¬Ìá¸ß×÷ÕßÔÚ¼¼ÊõȦ×ÓÀ ......

python ͼÏñ¶à±ßÐÎÇиî

pythonµÄPIL¿â×Ô´øµÄ·½·¨Ö»ÄܽøÐоØÐεÄÇиÈç¹ûÎÒÓÐÁËÒ»¸ö¶à±ßÐθ÷¸ö¶¥µãµÄ×ø±ê£¬ÈçºÎ¶ÔÏÖÓеÄͼƬ°´ÕÕÕâ¸ö¶à±ßÐνøÐÐÇиîÄØ£¿
²»Ò»¶¨ÒªÓÃPIL¿â£¬ÈκÎÄÜʵÏÖÕâ¸ö¹¦Äܵķ½·¨¶¼ÐС£

ͼƬÇиîµÄjs²»ÊǺܶàÂð£¿
......

C# RSA Python - .NET¼¼Êõ / C#

C#ÀïÃæÓÃusing System.Security.Cryptography; RSACryptoServiceProvider¼ÓÃܹýµÄÏûÏ¢
ÓÃPython CryptoÖÐRSAµÄ·½·¨ ÄÜÖ±½Ó ½âÂð£¿
RSA¼ÓÃÜ·½Ê½²»ÊÇͳһµÄÂð£¿ÐèҪעÒâЩʲô£¿

ÓаïÖú¡£µ«ÊÇû½â¾öÎÊÌâ¡£¡£¡£
......

PythonÐÂÊÖ±¨µ½ ´ó¼ÒÍƼö¸öIDE

×î½üÒ»¸öÏîÄ¿ÂíÉϾÍÒªÓÃPython±àÁË ´ó¼ÒÍƼö¸öIDE¡£¡£¡£
1 Ãâ·Ñ¡£¡£¡£
2 Ìå»ý×îºÃСһµã
3 ¹¦ÄÜÇ¿´ó
£¨ÅÅÃû²»·ÖÏȺ󡣡£¡£·Ï»°¡£¡££©

emacs,×î´óµÄÓŵãÊÇÒòΪ·ÇͼÐνçÃ棬ÓÃSSHÔ¶³ÌµÇ¼Ҳ¿ÉÒÔʹÓá£ËùÒÔ¿ÉÒÔÓ ......

Python urllib ÈçºÎÌí¼Ó½ø¶ÈÏÔʾ

code:
remote = urllib.urlopen(remote_file)
local_file = open(local_path_name, "wb")
local_file.write(remote.read())
ÎÊÌâ:
ÓÃÕâÖÖ·½Ê½¿ÉÒԺܺõÄÏÂÔØÔ¶³ÌÎļþ, ÏÖÔÚÐèÒª¼ÓÈëÒ»¸ö½ø¶ÈÏÔʾµÄ¹¦Ä ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ