Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

Make sure the string is opened and closed in the same way:

'C:\Users\miram\OneDrive\Documents\Programming\Original.txt"

starts with a simple quote ' and ends with a double quote ". Also, try first something like:

filename = r'C:\Users\miram\OneDrive\Documents\Programming\Original.txt'
import os.path
print "Is there any file %s ? %s" % ( filename, os.path.isfile( filename ) )

to make sure the file is found by the operating system. (From the cell and/or from the python started in the Windows OS command line.)