摘要:
<!DOCTYPE html><html lang="en"><head> <meta charset="UTF-8"> <title>Title</title></head><body><form action="https://www.sogou.com/web" method="post" e 阅读全文
摘要:
<!DOCTYPE html><html lang="en"><head> <meta charset="UTF-8"> <!--<meta http-equiv="content-Type"content="text/html;charset=UTF8">--> <!--全称,可以简写--> <m 阅读全文
摘要:
###标签# 是由一对尖括号包裹的单词构成 例如: <html> *所有标签中的单词不可能以数字开头.# 标签不区分大小写.<html> 和 <HTML>. 推荐使用小写.# 标签分为两部分: 开始标签<a> 和 结束标签</a>. 两个标签之间的部分 我们叫做标签体.# 有些标签功能比较简单.使用 阅读全文
摘要:
import socket#网络连接模块,模拟浏览器过程def headle_requests(conn): conn.recv(1024)#等待接收 conn.sendall(bytes("HTTP/1.1 201 OK\r\r\n\n",encoding="utf-8")) conn.senda 阅读全文
摘要:
#携程,(微线程)# import greenlet# gr1 = greenlet(test1)# gr1.switch()import geventfrom gevent import monkey;monkey.patch_all()#类似开启协程#gevent调用的greenletimpor 阅读全文
摘要:
import threadingt = threading.Thread()t.start()#开始线程t.setDaemon(True)#设置守护线程#不常用t.getName()#获得线程名t.is_alive()#判断线程是否激活状态t.setName()#设置线程名##l = threadi 阅读全文
摘要:
import queueimport contextlib#装饰成上下文函数,上下文管理器@contextlib.contextmanagerdef worker_state(a1,a2): a1.append(a2)#with后执行 try: yield#回到执行语句,语句执行完毕后返回这里 fi 阅读全文
摘要:
low_threadpool new_threadpool multiprocessing2 final_threadpool 阅读全文