@
icedx flask 工程代码:
import flask,os,time
import shutil
app = flask.Flask(__name__)
PageListbuff =[]
def ArichverData(id):
pass
def LoadArichversList():
tempList = []
files = os.listdir("Arichvers")
print files
#print files
for item in files:
titlefile = open("Arichvers/"+str(item)+"/title",'r')
tempList.append({"href":WebSiteUrl+titlefile.read(),"title":titlefile.read(),"Data":ArichverData(str(item))[0]})
print os.path.isfile("Arichvers/"+str(item)+"/title")
print os.listdir("Arichvers/"+str(item))
print titlefile.read()
titlefile.close()
PageListbuff=tempList
@
app.ruote("/")
def index():
pass
if __name__ == '__main__':
LoadArichversList()
app.run(host='0.0.0.0',port=80,threaded=True)
cmdshell 下直接进入 python 执行的代码就在图中,非常短