<分区>
Possible Duplicate:
How to escape os.system() calls in Python?
是否有一种 Python 方法可以在 Python 中以编程方式使文件名安全(即,将\放在空格前面并转义 ( , )、符号)?
<分区>
Possible Duplicate:
How to escape os.system() calls in Python?
是否有一种 Python 方法可以在 Python 中以编程方式使文件名安全(即,将\放在空格前面并转义 ( , )、符号)?
最佳答案
在 open()
中,空格对于 Python 来说已经是“安全的”了。至于os.system()
之类的函数,使用subprocess
相反。
关于Python - 文件名中的空格,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/2308394/