WebTrack ÔÚ python bottle frameworkÖеļòµ¥ÊµÏÖ
ÍøÂç³ô³æÒà¼´ÍøÂçÐű꣬ÊÇͨ¹ýijÖÖÊÖ¶ÎÒþʽ»ñÈ¡ÐÅÏ¢µÄµÄ·½·¨¡£
ÔÚbottle frameworkÖпÉÓÃÏÂÃæµÄ·½·¨ÊµÏÖ£º
Ê×ÏÈÔÚÄãÒªÓû§ä¯ÀÀÆ÷ÏÔʾµÄÒ³ÃætplÉÏǶÈëÒ»¸ö1*1ÏñËØµÄͼƬ£¬»ò¸üС¡£
Õâ¸öͼƬµØÖ·Ö¸ÏòÄã·þÎñÆ÷ÉÏij¸öÌØ¶¨Î»Öã¬Èçstatic/webtrack.png¡£
Óû§´ò¿ªÍøÒ³£¬¾Í»á·ÃÎÊÕâ¸öͼƬ£¨Í¨¹ýä¯ÀÀÆ÷Èçhttp://abc.abc.com/static/webtrack.png·½Ê½Ìá½»£©¡£ÔòÔڰ󶨺¯ÊýÀ
¿ÉÒÔͨ¹ýrequest.environ['REMOTE_ADDR']ºÍrequest.environ['REMOTE_HOST']À´
»ñµÃä¯ÀÀÓû§µÄIPµØÖ·ºÍÖ÷»úÃû¡££¨ÎÒÃÇ¿ÉÒÔͨ¹ýÕâ¸ö²»ÓÃÌá½»ÓлØÖ´µÄÓʼþÀ´²âÊÔÓʼþµØ
Ö·ÓзñÓÐЧ£¬Óû§´ò¿ªÓʼþ£©¡£ºôºô¡£
Ïà¹ØÎĵµ£º
±¾ÎÄ×ܽáÁËÔÚPythonÖÐÖ÷ÒªµÄ¼¸ÖÖ´¦ÀíXMLµÄ·½·¨£º
Element Tree
SAX
Dom
ʹÓõÚÈý·½Àà¿âÈçAmara 2.x£¬ libxml2dom µÈ
Element Tree
Element TreeÊÇPython 2.5ÒýÈëµÄʹÓüòµ¥£¬¿ì½ÝµÄ´¦Àí·½·¨£¬ Ò²ÊÇPython±ê×¼Àà¿âÍÆ¼öµÄ´¦ÀíXMLµÄ·½·¨¡£
ËüʹÓÃÊ÷ÐνڵãµÄÐÎʽÀ´¶ÁдXML¡£Element TreeÊÇÇáÁ¿¼¶µÄDOM£¬ ËùÒÔÊ ......
from http://stackoverflow.com/questions/101268/hidden-features-of-python
http://www.okpython.com/bbs/thread-3434-1-1.html
http://www.okpython.com/bbs/thread-3436-1-2.html
http://www.okpython.com/bbs/thread-3437-1-2.html
http://www.okpython.com/bbs/thread-3438-1-1.html
http://www.okpython.com/bb ......
ÿ¸öÄ£¿é¶¼ÓÐÒ»¸öÃû³Æ£¬ÔÚÄ£¿éÖпÉÒÔͨ¹ýÓï¾äÀ´ÕÒ³öÄ£¿éµÄÃû³Æ¡£ÕâÔÚÒ»¸ö³¡ºÏÌØ±ðÓÐÓÃ
——¾ÍÈçÇ°ÃæËùÌáµ½µÄ£¬µ±Ò»¸öÄ£¿é±»µÚÒ»´ÎÊäÈëµÄʱºò£¬Õâ¸öÄ£¿éµÄÖ÷¿é½«±»ÔËÐС£
ÿ¸öPythonÄ£¿é¶¼ÓÐËüµÄ__name__£¬Èç¹ûËüÊÇ'__main__'£¬Õâ˵Ã÷Õâ¸öÄ£¿é±»Óû§µ¥¶ÀÔËÐУ¬
ÎÒÃÇ¿ÉÒÔ½øÐÐÏàÓ¦µÄÇ¡µ±²Ù×÷¡£
#!/usr/bin/pytho ......
ÔÚ»ùÓÚ»¥ÁªÍøµÄÓ¦ÓÃÖУ¬³ÌÐò¾³£ÐèÒª×Ô¶¯µØ·¢Ë͵ç×ÓÓʼþ¡£È磺һ¸öÍøÕ¾µÄ×¢²áϵͳ»áÔÚÓû§×¢²áʱ·¢ËÍÒ»·âÓʼþÀ´È·ÈÏ×¢²á£»µ±Óû§Íü¼ÇµÇ½ÃÜÂëµÄʱºò£¬Í¨¹ýÓʼþÀ´È¡»ØÃÜÂë¡£smtplibÄ£¿éÊÇpythonÖÐsmtp(¼òµ¥Óʼþ´«ÊäÐÒé)µÄ¿Í»§¶ËʵÏÖ¡£ÎÒÃÇ¿ÉÒÔʹÓÃsmtplibÄ£¿é£¬ÇáËɵķ¢Ë͵ç×ÓÓʼþ¡£ÏÂÃæµÄÀý×ÓÓÃÁ˲»µ½Ê®ÐдúÂëÀ´·¢Ë͵ç×ÓÓÊ ......
ãÂã¶®¶®µÄ°²×°ÁËPython£¬²»Îª±ðµÄ£¬Ö»Îª¸Ïµãʱ÷Ö£¬ÒòΪ¿´¼ûºÜ¶àÓÎÏ·¹«Ë¾¶¼ÒªÇó»áÒ»µãPython»òÕßLUA£¬Ã»°ì·¨£¬»¹ÊǶàѧһµãºÃ£¬·´ÕýÏÐ×ÅÒ²ÊÇÏÐ×Å¡£×Ô¼ºÄ¿Ç°²»¶®LINUX£¬ËùÒÔÔÝÇÒÓÃÓÃWINDOWSϵİɡ£
ÈëÃÅ»¹ºÃÈëÊÖ£¬²»ÊǾÞÄÑ£¬Ö¸³ö¼¸µãÓÐÒâ˼µÄ£º
ûÓлù±¾ÀàÐÍÁË£¬µ±ÎÒ°²cÓïÑÔÓ﷨дint xÊ ......