我正在尝试将名为 test_target.sh(目标是此处的变量)的文件复制到作为目标位置的 ROOT,在尝试命名 test_target.sh 时遇到编译错误 ..有关如何修复它的任何输入?
import os import subprocess from subprocess import check_call,Popen, PIPE from shutil import copyfile
def main ():
ROOT = '/local/mnt/workspace'
target = 'msm8960'
copyfile("./test_" + target + ".sh", ROOT + "./test_" + target + ".sh")
if __name__ == '__main__':
main()
错误:-
IOError: [Errno 2] No such file or directory: '/local/mnt/workspace./test_msm8960.sh