摘要: import abc #定义一个说话的方式接口类,只能被继承 不能被实例化 class Speak(abc.ABC): #@abc.abstractmethod @abc.abstractmethod def to_speak(self): pass #定义学生说话的类 class Student( 阅读全文
posted @ 2021-06-03 19:25 神迹丶 阅读(68) 评论(0) 推荐(0) 编辑
摘要: import urllib.request import requests #打开网站判断是否能正常打开,并返回链接状态 def print_openUrl(m_url): try: myurl =urllib.request.urlopen(m_url) print(myurl.getcode() 阅读全文
posted @ 2021-06-03 18:53 神迹丶 阅读(243) 评论(0) 推荐(0) 编辑
摘要: import time #获取本地时间 localtime =time.localtime(time.time()) #返回的是以元组形式的参数:time.struct_time(tm_year=2021, tm_mon=6, tm_mday=3, tm_hour=13, tm_min=34, tm 阅读全文
posted @ 2021-06-03 13:53 神迹丶 阅读(896) 评论(0) 推荐(0) 编辑
摘要: import queue import threading import time exitFlag =0 class myThread(threading.Thread): def __init__(self, threadID, name, m_queue): threading.Thread. 阅读全文
posted @ 2021-06-03 03:14 神迹丶 阅读(717) 评论(0) 推荐(0) 编辑
摘要: import threading import time exitFlag =0 class myThread(threading.Thread): def __init__(self, threadID, name, counter): threading.Thread.__init__(self 阅读全文
posted @ 2021-06-03 01:54 神迹丶 阅读(93) 评论(0) 推荐(0) 编辑
网站已运行: