我在sublime和editplus里写python,如下几句:
-*- coding: utf-8 -*-
import shutil
shutil.copyfile('hello.txt', 'hello2.txt')
提示错误:
Traceback (most recent call last):
File "F:\Python\exercise\文件处理\shutil.py", line 2, in
import shutil
File "F:\Python\exercise\文件处理\shutil.py", line 3, in
shutil.copyfile('hello.txt', 'hello2.txt')
AttributeError: 'module' object has no attribute 'copyfile'
[Finished in 0.6s]