擅长:python、mysql、java
<p>我解决了这个问题,你应该是目的地的完整目标文件名</p>
<p>目的地=路径目录+文件名。*</p>
<p>我在shuil中使用此代码fir copy wav文件:</p>
<pre><code> # open file with QFileDialog
browse_file = QFileDialog.getOpenFileName(None, 'Open file', 'c:', "wav files (*.wav)")
# get file name
base = os.path.basename(browse_file[0])
os.path.splitext(base)
print(os.path.splitext(base)[1])
# make destination path with file name
destination= "test/" + os.path.splitext(base)[0] + os.path.splitext(base)[1]
shutil.copyfile(browse_file[0], destination)
</code></pre>