mirror of
https://github.com/WMK965/965-Python-Learning-Repo.git
synced 2025-04-27 14:03:22 +00:00
添加实践内容(学习通文档捕捉)
This commit is contained in:
parent
19e2a4ace4
commit
522c3da7d1
14
ChaoxingDocumentCapture/scripts.py
Normal file
14
ChaoxingDocumentCapture/scripts.py
Normal file
@ -0,0 +1,14 @@
|
|||||||
|
import os
|
||||||
|
import glob
|
||||||
|
while True:
|
||||||
|
data = input()
|
||||||
|
print("\n")
|
||||||
|
data = data.rsplit('/', 1)
|
||||||
|
maxpic = int(str(data[1]).split('.')[0])
|
||||||
|
suffix = '.png'
|
||||||
|
for i in range(1, maxpic + 1):
|
||||||
|
print(data[0] + f"/{i}" + suffix)
|
||||||
|
print("\n")
|
||||||
|
path = 'C:/Users/965/Downloads'
|
||||||
|
for infile in glob.glob(os.path.join(path, '*.png')):
|
||||||
|
os.remove(infile)
|
BIN
results/111.png
BIN
results/111.png
Binary file not shown.
Before Width: | Height: | Size: 297 KiB After Width: | Height: | Size: 290 KiB |
Loading…
Reference in New Issue
Block a user