\t
is a tab character. Use a raw string instead:
test_file=open(r'c:\Python27\test.txt','r')
or double the slashes:
test_file=open('c:\\Python27\\test.txt','r')
or use forward slashes instead:
test_file=open('c:/Python27/test.txt','r')
More Related Contents:
- Create or open file in python [closed]
- Find all files in a directory with extension .txt in Python
- Lazy Method for Reading Big File in Python?
- open() gives FileNotFoundError/IOError: Errno 2 No such file or directory
- How to open a file for both reading and writing?
- Print string to text file
- Python recursive folder read
- How to write a multidimensional array to a text file?
- Read file from line 2 or skip header row
- How might I remove duplicate lines from a file?
- Writing a list to a file with Python, with newlines
- Difference between parsing a text file in r and rb mode
- File read using “open()” vs “with open()” [duplicate]
- How do I create an incrementing filename in Python?
- Inline CSV File Editing with Python
- How to open a password protected excel file using python?
- Python write to a file returns empty file
- pandas to_csv output quoting issue
- Python Pandas: How to read only first n rows of CSV files in?
- How to safely open/close files in python 2.4
- python close file descriptor question
- ValueError : I/O operation on closed file
- Reading a file with a specified delimiter for newline
- How to read a single character at a time from a file in Python?
- How to read lines from a file in python starting from the end
- Undo a file readline() operation so file-pointer is back in original state
- Write file with specific permissions in Python
- Is it possible to get writing access to raw devices using python with windows?
- pickle.load() raising EOFError in Windows
- Change file to read-only mode in Python