|
发表于 2020-4-3 09:04:50
|
显示全部楼层
直接改名我的文件, name.py.txt 为 name.py, 双击,或者用 python.exe name.py 调用即可。
只有3行是代码,你复制的是:
Python 3.7.0 (v3.7.0:1bf9cc5093, Jun 27 2018, 04:59:51) [MSC v.1914 64 bit (AMD64)] on win32
Type "copyright", "credits" or "license()" for more information.
>>> import os
for file in os.listdir("test"):
os.system("ren test\\" + file + " u" + hex(ord(file[:-4]))[2:] + ".bmp")
Python 3.7.0 (v3.7.0:1bf9cc5093, Jun 27 2018, 04:59:51) [MSC v.1914 64 bit (AMD64)] on win32
Type "copyright", "credits" or "license()" for more information.
>>>
这些内容不需要啊。这个是交互工具输出的信息。 |
|