|
|

楼主 |
发表于 2017-6-3 11:43:49
|
显示全部楼层
- >>> f = open('C:\\zhuzhu.txt','w')
- Traceback (most recent call last):
- File "<pyshell#19>", line 1, in <module>
- f = open('C:\\zhuzhu.txt','w')
- PermissionError: [Errno 13] Permission denied: 'C:\\zhuzhu.txt'
- >>> f = open('C:\\zhuzhu.txt','a')
- Traceback (most recent call last):
- File "<pyshell#20>", line 1, in <module>
- f = open('C:\\zhuzhu.txt','a')
- PermissionError: [Errno 13] Permission denied: 'C:\\zhuzhu.txt'
- >>> f = open('C:\\zhuzhu.txt','x')
- Traceback (most recent call last):
- File "<pyshell#21>", line 1, in <module>
- f = open('C:\\zhuzhu.txt','x')
- FileExistsError: [Errno 17] File exists: 'C:\\zhuzhu.txt'
复制代码 |
|