I need to compare paths. In a textile, I get paths like:
'C:\\\\Windows\\\\System32\\\\kernel32.dll'
The other path I get from the command line.
To compare the two strings I tried:
while path.find('\\') != -1:
path.replace('\\\\','\\', 1)
but this changes nothing.
Also the builtin functions os.path.normpath()
and os.path.realpath()
don't remove the backslashes.
How to remove the backslashes from the string?