すべての情報を含む1つのファイルに2つ以上のファイルを追加します。私のコードは次のとおりです。IOError:[Errno 2]そのようなファイルやディレクトリはありません: 't' python
IOError: [Errno 2] No such file or directory: 't'
理由:
def add_file(filenames, output_file):
with open(output_file, 'w') as master_file:
master_file.write('C/A,UNIT,SCP,DATEn,TIMEn,DESCn,ENTRIESn,EXITSn\n')
for filename in filenames:
with open(filename, 'r') as infile:
master_file.write(infile.read())
私はすべてのファイルに ショーを置くために呼び出すと?私は何を間違えたの?
あなたは 'filenames'の文字列を渡しているので、文字列 – Wondercricket