No such file or directory: 'c:\\windows\\temp\\test'

contro opinion contropinion at gmail.com
Sun Apr 15 05:13:51 EDT 2012


in my computer
C:\Python27>python
Python 2.7.2 (default, Jun 12 2011, 15:08:59) [MSC v.1500 32 bit (Intel)]
on win
32
Type "help", "copyright", "credits" or "license" for more information.
1.
>>> f=open(r'c:\windows\temp\test','r')
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
IOError: [Errno 2] No such file or directory: 'c:\\windows\\temp\\test'
2.
>>> f=open(r'c:\windows\temp\test.txt','r')
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
IOError: [Errno 2] No such file or directory: 'c:\\windows\\temp\\test.txt'
3.
>>> f=open('c:\\windows\\temp\\test','r')
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
IOError: [Errno 2] No such file or directory: 'c:\\windows\\temp\\test'
4.
>>> f=open('c:\\windows\\temp\\test.txt','r')
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
IOError: [Errno 2] No such file or directory: 'c:\\windows\\temp\\test.txt'

would you mind telling me what's wrong ?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-list/attachments/20120415/f3ae2ab3/attachment.html>


More information about the Python-list mailing list