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

дÁ˼¸¸öÓйØoperaminimodµÄpythonС³ÌÐò

дÁ˼¸¸öÓйØoperaminimodµÄpythonС³ÌÐò
firefox->opmÊéǩת»»
import re
def pipeiwangzhi(a):
    s=[]
    pp= re.compile(r'<DT><A HREF="(.*)" ADD_DATE=(.*>)(.*)</A>')
    m=pp.search(a)
    s1=[]
    if m!=None:
        s=m.groups()       
        s1.append(s[0])
        s1.append(s[2])
    return s1
fnlang='f:\\bookmarks.html'
f1 = open(fnlang,'rb')
ffbk=f1.readlines()        
f1.close()
opbkmg=[]
for i in ffbk:
    a=i.decode('utf-8')
    ss=[]
    ss=pipeiwangzhi(a)
    if ss!=[]:
        opbkmg.append(ss)
#print(opbkmg)
tou="""<!DOCTYPE NETSCAPE-Bookmark-file-1>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=UTF-8">
<!--This is generated file from Opera Mini mod v.3.12.
It will be read and overwritten.
Do Not Edit! -->
<TITLE>Bookmarks</TITLE>
<H1>Bookmarks</H1>
<DL><P>\n"""
x1='<DT><img src="" alt="" width="12" height="12" /><A HREF="'
x2='">'
x3='</A><PARAM NAME="fav" VALUE="0:/">\n'
wei='</DL><P>'
opbk=''
for i in opbkmg:
    opbk+=x1+i[0]+x2+i[1]+x3
   
opbk=tou+opbk+wei
   
   
#print(opbk.encode('utf-8'))
fnlang='f:\\bookmarks.htm'
f1 = open(fnlang,'wb')
f1.write(opbk.encode('utf-8'))        
f1.close()


Ïà¹ØÎĵµ£º

Python·¢Õ¹Ê·

PythonµÄ´´Ê¼ÈËΪGuido van
Rossum¡£1989ÄêÊ¥µ®½ÚÆÚ¼ä£¬ÔÚ°¢Ä·Ë¹Ìص¤£¬GuidoΪÁË´ò·¢Ê¥µ®½ÚµÄÎÞȤ£¬¾öÐÄ¿ª·¢Ò»¸öеĽű¾½âÊͳÌÐò£¬×öΪ ABC
ÓïÑÔµÄÒ»Öּ̳С£Ö®ËùÒÔÑ¡ÖÐ Python£¨´óòþÉßµÄÒâ˼£©×÷Ϊ³ÌÐòµÄÃû×Ö£¬ÊÇÒòΪËûÊÇÒ»¸öMonty PythonµÄ·ÉÐÐÂíÏ·Íŵİ®ºÃÕß¡£
ABCÊÇÓÉGuido²Î¼ÓÉè¼ÆµÄÒ»ÖÖ½ÌѧÓïÑÔ¡£¾ÍGuido±¾ÈË¿´ ......

ʹÓà Notepad++ ±à¼­ÔËÐÐ Python ³ÌÐò


Posted on 18:40:00 by ÏþÔÂ and filed under Notepad++, Python
¡¡¡¡Notepad++ ÊÇÒ»¸ö¿ªÔ´µÄÎı¾±à¼­Æ÷£¬¹¦ÄÜÇ¿´ó¶øÇÒʹÓ÷½±ã¡£±à¼­ºÍµ÷ÊÔ Python ³ÌÐòʹÓÃʲô±à¼­Æ÷»òÕß IDE ²»Í¬ÈËÓв»Í¬¼û½â¡£ÔÚ²»¿¼ÂÇʹÓõ÷ÊÔ¹¤¾ßµÄÇé¿öÏ£¬Vim »òÕß Emacs Óû§×ÔÈ»¿ÉÒÔÎÞÊÓÆäËû±à¼­Æ÷£¬²»¹ýÔÚ Windows »·¾³Ï£¬Ê¹Óà Notepad++ Ö ......

±£´æÖ¸¶¨Îļþ¼ÐϵÄĿ¼ºÍÎļþÃûµ½ÎļþÖÐ Python ½Å±¾

ÕæÊǵ¹Ã¹£¬¸ÕÂò²»¾ÃµÄÒÆ¶¯Ó²ÅÌ£¬×òÌìɾ³ýÒ»¸ö·ÖÇøÊ§°Üºó£¬¼¸¸ö·ÖÇø¶¼²»¼ûÁË£¬ÄÃÈ¥ÐÞ£¬Î´¹û
»»Á˸öÐµģ¬µ«ÆäÖÐÊý¾ÝȫûÁË¡£ÄÇÊÇÎÒÆ½Ê±ÊÕ¼¯µÄºÜÓÐÓõÄ×ÊÁÏ
ºÜ¶à¶¼¿ÉÒÔÖØÐÂÏÂÔØ£¬µ«ÔõÄÜÏëÆðÓ²ÅÌÖеÄËùÓж«Î÷
½ñÌì»»Ó²ÅÌ»ØÀ´
¾ÍÏñдһ¸ö±£´æÖ¸¶¨Â·¾¶ÏÂËùÓÐÎļþ¼ÐºÍÎļþÃûµÄ³ÌÐò
ÕâÑù£¬Èç¹û¶«Î÷¶ªÁË£¬¿´¿´ÄÇÀïÓÐЩʲô£¬Ò² ......

[Python module] select

16.1. select — Waiting for I/O completion¶
This module provides access to the select and poll functions available in most operating systems, epoll available on Linux 2.5+ and kqueue available on most BSD. Note that on Windows, it only works for sockets; on other operating systems, it al ......

[Python module] threading

threading — Higher-level threading interface
This module constructs higher-level threading interfaces on top of the lower level _thread module. See also the queue module.
The dummy_threading module is provided for situations where threading cannot be used because _thread is missing.
  ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØÍ¼ | ¸ÓICP±¸09004571ºÅ