<reponame>dong-pro/fullStackPython<filename>p1_basic/day27_31netpro/day31/04_修改文件名称.py<gh_stars>1-10
import os
import shutil

# py2 + win：报错
# os.rename('a.text','b.txt')

# py2+py3
shutil.move('c.txt', 'a.txt')

# 删除文件
# shutil.rmtree('D:\sylar\s15\day30')

# 类似微信中表情
v = '\ue056'
print(v)
import os
import shutil

# py2 + win：报错
# os.rename('a.text','b.txt')

# py2+py3
shutil.move('c.txt', 'a.txt')

# 删除文件
# shutil.rmtree('D:\sylar\s15\day30')

# 类似微信中表情
v = '\ue056'
print(v)
# py2 + win：报错 # os.rename('a.text','b.txt') # py2+py3 # 删除文件 # shutil.rmtree('D:\sylar\s15\day30') # 类似微信中表情