This commit is contained in:
dongchangxi committed 2023-11-16 09:25:49 +08:00
1 parent 3197efd6a3
commit 46dacc2f7c
7 files changed
+62 -13

No files matched your search

+9
View File
@@ -1,6 +1,7 @@
import redis,sys,os,re,oss2
import platform
import xml.etree.ElementTree as ET
from PIL import ImageGrab
if platform.system() == 'Windows':
#sys.path.append('e:\\libs\\')
sys.path.append('libs')
@@ -218,3 +219,11 @@ def uploadControlPointsOss(pid):
localfile = os.path.join(config.workdir,str(pid), f'{str(pid)}_wait/controlpoints0.dat')
#进行上传
config.oss_bucket.put_object_from_file(filePath, localfile)
#截屏保存
def saveScreenImg(pid):
#获取当前的日志
if not os.path.exists(os.path.join("D:/screen/",time.strftime("%y-%m-%d", time.localtime()))):
os.makedirs(os.path.join("D:/screen/",time.strftime("%Y-%m-%d", time.localtime())))
screenshot = ImageGrab .grab()
screenshot.save(os.path.join("D:/screen/",time.strftime("%Y-%-%d'time .localtime()"),str(pid)+".png"))