首页    新闻    小组    威客    人才    下载    博客    代码贴    在线编程    论坛
代码贴mimijilu的代码贴Python 3
#!/usr/bin/python3
from bottle import route,hook,template, run,request,response,get
import pymysql,json
@hook('after_request')
def enable_cors():
    response.headers['Access-Control-Allow-Origin'] = '*'
    response.headers['Access-Control-Allow-Methods'] = 'GET, POST, PUT, OPTIONS'
    response.headers['Access-Control-Allow-Headers'] = 'Authorization, Content-Type, Depth, User-Agent, X-File-Size, X-Requested-With, X-Requested-By, If-Modified-Since, X-File-Name, X-File-Type, Cache-Control, Origin'
@get('/hello')
def hello():
    db = pymysql.connect(host="172.16.8.224",user= "reader", password="123456",database= "student_information",port=1432)
    cursor = db.cursor()
......................
阅读全部 | 2021年11月16日 12:44
#!/usr/bin/python3
print('y=应用层,b=表示层,h=会话层,c=传输层,wa=网络层,s=数据链路层,wu=物理层')
print('请输入答案,以空格隔开:')
while True:
b=[-1,-1,-1,-1,-1,-1,-1]
a=input().split()
if a[0]=='exit' : break;
if a[0]=='js':
c=eval(a[1])
print (c)
continue
for i in range(0,len(a)):
......................
阅读全部 | 2020年11月23日 12:53
1
mimijilu