摘要: 1.子类继承父类时,如果没有显式调用父类__init__方法或者重写__init__方法,子类会继承父类的__init__方法,子类对父类进行扩展时,可重写父类__init__方法并加以调用。 class A: def __init__(self): self. a = 1class B(A): d 阅读全文
posted @ 2020-08-10 16:06 聚集的流星 阅读(97) 评论(0) 推荐(0) 编辑
摘要: import time import sys for i in range(5): print i, #sys.stdout.flush() time.sleep(1)# sys.stdout.flush()加注释将会等待5秒,最终输出0 1 2 3 4,不加将会每隔1秒输出一个数字# sys.st 阅读全文
posted @ 2020-08-10 14:15 聚集的流星 阅读(1632) 评论(0) 推荐(0) 编辑
摘要: [uwsgi] socket = 127.0.0.1:8080 chdir = /usr/share/server wsgi-file = server.py callable = app processes = 4### location ~ ^/ { include uwsgi_params; 阅读全文
posted @ 2020-08-10 14:12 聚集的流星 阅读(254) 评论(0) 推荐(0) 编辑