Skip to content

Commit 4e2588f

Browse files
[投稿] 添加脚本: cmd2.0修正测试 — by ioo
1 parent e2e0278 commit 4e2588f

1 file changed

Lines changed: 29 additions & 0 deletions

File tree

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
# 欢迎使用 PythonIDE!如果觉得好用,请给个好评哦~
2+
import json
3+
from pathlib import Path
4+
import time
5+
import random
6+
Y = "\033[93m"
7+
print("==========by ioo project==========")
8+
time.sleep(1)
9+
print("= 这是一个测试文件 =")
10+
time.sleep(1)
11+
print("=使用我的作品 模拟cmd可能会出现一些问题=")
12+
time.sleep(1)
13+
print("= 建议使用此工具进行测试 =")
14+
for i in range(51):
15+
percent = i *2
16+
print(f"\r|{ '█' * i }{ ' ' * (50 - i) }|{ percent }%", end="")
17+
time.sleep(random.uniform(0.1, 0.3))
18+
path=Path("dosfile.txt")
19+
if path.exists():
20+
file=json.loads(path.read_text())
21+
print(file)
22+
print("= 测试成功4.1 =")
23+
else:
24+
file={"command.com":"bin","io.sys":"sys"}
25+
print("\n= 错误,已修复 =")
26+
path.write_text(json.dumps(file))
27+
k="#愚人节做的嘿嘿"
28+
if input(">") == "Y":
29+
print(k)

0 commit comments

Comments
 (0)