未验证 提交 6de81af0 编写于 作者: B Bernard Xiong 提交者: GitHub

Merge pull request #4466 from mysterywolf/python3

[python3] 部分脚本从python2语法升级到python3
...@@ -35,12 +35,12 @@ if rtconfig.CROSS_TOOL == 'gcc': ...@@ -35,12 +35,12 @@ if rtconfig.CROSS_TOOL == 'gcc':
if sys.platform.startswith('linux'): if sys.platform.startswith('linux'):
import glob import glob
ocwd = os.getcwdu() ocwd = os.getcwd()
res = os.system('cd ../Libraries/; find -name \*.o -exec rm {} \;') res = os.system('cd ../Libraries/; find -name \*.o -exec rm {} \;')
os.chdir(ocwd) os.chdir(ocwd)
else: else:
# Assume Windows. # Assume Windows.
ocwd = os.getcwdu() ocwd = os.getcwd()
print('TODO: remove the object files in ../Libraries') print('TODO: remove the object files in ../Libraries')
os.chdir(ocwd) os.chdir(ocwd)
......
...@@ -85,7 +85,7 @@ class Folder(object): ...@@ -85,7 +85,7 @@ class Folder(object):
# TODO: take care of the unicode names # TODO: take care of the unicode names
for ent in os.listdir(u'.'): for ent in os.listdir(u'.'):
if os.path.isdir(ent): if os.path.isdir(ent):
cwd = os.getcwdu() cwd = os.getcwd()
d = Folder(ent) d = Folder(ent)
# depth-first # depth-first
os.chdir(os.path.join(cwd, ent)) os.chdir(os.path.join(cwd, ent))
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册