I tried imitating my code in simple steps on python prompt:
>>> path="D:/workspace/a/b\\c\\d.txt"
>>> path[0,18]
But it gives me following error:
TypeError: string indices must be integers
I wanted to retrieve only directory as path. That is, I want to strip away the file name: D:/workspace/a/b\\c
Why I am getting this error?