【发布时间】:2011-06-30 11:13:21
【问题描述】:
dir = "C:\Users\Geraldes\Desktop\media\teste\ASMS_TapeA01A1691329.mxf"
print dir
使用上面的代码,我明白了...我知道 \t 是制表符
C:\Users\Geraldes\Desktop\media (espacamento) este\ASMS_TapeA01A1691329.mxf
但是,要解决这个问题,我会这样做:
dir1 = dir.replace("\\", "\\\\")
print "dir:",dir1
我得到了
C:\\Users\\Geraldes\\Desktop\\media (espacamento) este\\ASMS_TapeA01A1691329.mxf
我该如何解决这个问题?
【问题讨论】: