スクリプトでpythonを使用する際に
ファイルの有無を確認したい場合がある。
ファイルが無い場合、エラーとする場合、
import os
if not os.path.exists(infile):
print ("infile does not exist \n",infile)
exit(1)
スクリプトでpythonを使用する際に
ファイルの有無を確認したい場合がある。
ファイルが無い場合、エラーとする場合、
import os
if not os.path.exists(infile):
print ("infile does not exist \n",infile)
exit(1)