Dec-20-2016, 03:44 PM
(Dec-20-2016, 03:15 PM)snippsat Wrote: And remember never a single backslash this way\
.
You are lucky here because not hitting any escape character.
Eg with an other file name it had gone wrong.
>>> s = 'C:\projects\Dec-20-16\test.txt' >>> print(s) C:\projects\Dec-20-16 est.txtSo always\\\
or/
orr'path'
Yes, I have missed that.
os.path
module can handle paths pretty well.https://docs.python.org/3/library/os.path.html