|
|
马上注册,结交更多好友,享用更多功能^_^
您需要 登录 才可以下载或查看,没有账号?立即注册
x
py的可以打开
>>> f=open('df.py')
>>> print(f)
<_io.TextIOWrapper name='df.py' mode='r' encoding='UTF-8'>
其他文件无法读取
pages:
f=open('问卷.pages')
FileNotFoundError: [Errno 2] No such file or directory: '问卷.pages'
>>> f=open(zy.pages)
Traceback (most recent call last):
File "<pyshell#4>", line 1, in <module>
f=open(zy.pages)
NameError: name 'zy' is not defined
>>> f=open('zy.pages')
Traceback (most recent call last):
File "<pyshell#5>", line 1, in <module>
f=open('zy.pages')
FileNotFoundError: [Errno 2] No such file or directory: 'zy.pages'
>>> f=open('zy.rtf')
Traceback (most recent call last):
File "<pyshell#6>", line 1, in <module>
rtf(文本编辑器):
f=open('zy.rtf')
FileNotFoundError: [Errno 2] No such file or directory: 'zy.rtf'
>>> f=open('任务书.doc')
Traceback (most recent call last):
File "<pyshell#7>", line 1, in <module>
word(doc):
f=open('任务书.doc')
FileNotFoundError: [Errno 2] No such file or directory: '任务书.doc'
>>> f=open('string1.txt')
Traceback (most recent call last):
File "<pyshell#8>", line 1, in <module>
txt:
f=open('string1.txt')
FileNotFoundError: [Errno 2] No such file or directory: 'string1.txt'
|
|