[Python] 纯文本查看 复制代码import web import os
import time
from PIL import ImageGrab
import numpy as np
import cv2
urls = (
'/reboot_html/(.*)', 'reboot_html',
'/jp_html/(.*)', 'jp_html',
'/shutdown_html/(.*)', 'shutdown_html',
'/(js|css|images)/(.*)', 'static'
)
app = web.application(urls, globals())
render = web.template.render('templates/')
#重启电脑
class reboot_html:
def GET(self, text):
print('input:' + text)
adb ='shutdown -r now'
d = os.popen(adb)
return render.reboot(content=text.upper())
#截屏
class jp_html:
def GET(self, text):
print('input:' + text)
beg = time.time()
debug = False
# img &#