好的,我有另一个问题。我实现了错误检查,但出于某种原因它仍然无法正常工作。我仍然会得到Python错误,而不是我在程序中刚写的错误。
Traceback (most recent call last):
File "E:/python/copyfile.py", line 31, in <module>
copyFile()
File "E:/python/copyfile.py", line 8, in copyFile
file1 = open(source,"r")
IOError: [Errno 2] No such file or directory: 'C:/Users/Public/asdf.txt'