Attachment 'html.py'

Download

   1 # -*- coding: utf8 -*-
   2 #base = 0xa2e5 # ㈠
   3 from const import mid
   4 replace = 'alt="%s"'
   5 
   6 if __name__ == '__main__':
   7     html = open('raw.html', 'r').read()
   8     for num in range(1, 10):
   9         html = html.replace(replace % num, replace % (mid % num))
  10     open('restructed.html', 'w').write(html)

Attached Files

To refer to attachments on a page, use attachment:filename, as shown below in the list of files. Do NOT use the URL of the [get] link, since this is subject to change and can break easily.
  • [get | view] (2021-05-11 08:51:54, 0.0 KB) [[attachment:const.py]]
  • [get | view] (2021-05-11 08:51:54, 0.0 KB) [[attachment:diveintopython-helpzh-cn-5.4b.zip]]
  • [get | view] (2021-05-11 08:51:54, 0.0 KB) [[attachment:diveintopython.html]]
  • [get | view] (2021-05-11 08:51:54, 0.0 KB) [[attachment:download.7z]]
  • [get | view] (2021-05-11 08:51:54, 0.0 KB) [[attachment:examples.7z]]
  • [get | view] (2021-05-11 08:51:54, 0.0 KB) [[attachment:html.7z]]
  • [get | view] (2021-05-11 08:51:54, 0.3 KB) [[attachment:html.py]]
  • [get | view] (2021-05-11 08:51:54, 0.0 KB) [[attachment:htmlflat.7z]]
  • [get | view] (2021-05-11 08:51:54, 0.0 KB) [[attachment:txt.7z]]
  • [get | view] (2021-05-11 08:51:54, 0.0 KB) [[attachment:txt.py]]
  • [get | view] (2021-05-11 08:51:54, 0.0 KB) [[attachment:txt1.7z]]
 All files | Selected Files: delete move to page copy to page

You are not allowed to attach a file to this page.