转义反斜杠(
)os.path.isdir('X:\pythonscripts\src')或使用原始字符串:
os.path.isdir(r'X:pythonscriptssrc')
没有逃脱,你走错了路:
>>> 'f''x0c'>>> print 'f'>>> print '\f'f>>> print r'f'f

转义反斜杠(
)os.path.isdir('X:\pythonscripts\src')或使用原始字符串:
os.path.isdir(r'X:pythonscriptssrc')
没有逃脱,你走错了路:
>>> 'f''x0c'>>> print 'f'>>> print '\f'f>>> print r'f'f