A double quote looks like this “. If I put this inside a python string I get this ' " '. In python, I can put two double quotes in a string ' "" ' and this gets printed as two double quotes. However, I cannot put a single double quote in a string, as before, ' " '. I am doing this in eclipse with pydev and it gives an error: "encountered "\r" (13), after : "". I am trying to do the following with command pipe and file names:
logA = 'thing.txt'
cmdpipe = os.popen('copy "C:\upe\' + logA + '"' + ' "C:\upe\log.txt"')
You need to escape the backslashes, otherwise it will do odd things.
Edit: A more pythonic way would be this though: