Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
Download
7550 views
ubuntu2004
1
import os.path
2
3
from argparse import ArgumentParser
4
5
parser = ArgumentParser()
6
7
parser.add_argument('--file', required=True)
8
9
arguments = parser.parse_args()
10
11
if os.path.isfile(arguments.file):
12
print ("{} exists!".format(arguments.file))
13
else:
14
print ("{} does not exist!".format(arguments.file))
15