-3
from sys import argv
from os.path import exists
print "Look what I can do"
script,This_file,That_file,=argv
print "I'm gonna paste this into that"
Whatever=open(That_file)
Whatevers = That_file.read()
"So That_file is %d bytes long"%len(Whatever)
"Do the input and output files exist?"% exists(This_file,That_file)
Huh=open(That_file)
Huh.write(Whatever)
AttributeError: 'str' object has no attribute 'read'
わかりました私はあなたのすべてがまだme.Iだけで作成しようとしていた役立つことを願ってquestion.Iの珍しい外観を言い訳してください、このサイトには比較的新しいですある.txtから別の.txtにコンテンツを貼り付けるプログラム。 – b1lal555
文字列を読み取ることができません。ファイルを読み取ることができます。 'That_file'は文字列、' Whatever'はファイルです。 >> 'Whatever.read()' – Julien
あなたの質問は何ですか?白線でエラーが発生しますか?なぜあなたのコードは二重に区切られますか?よりわかりやすい変数名を使用してください。 –