Answer the question
In order to leave comments, you need to log in
Problem reading paths from file?
>>> str1 = "some\new\path\version1"
>>> myf = StringIO()
>>> myf.write(str1)
>>> myf.seek(0)
>>> print myf.getvalue()
some
ew\path
ersion1
some\new\path\version1
>>> print myf.getvalue().encode('string_escape').replace(r'\\', r'\\'[:-1]).replace(r'\x0b', r'\v')
some\new\path\version1
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question