28.10.2021 Views

Python Tutorial ( PDFDrive )

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

print 'Input file is "', inputfile

print 'Output file is "', outputfile

if __name__ == "__main__":

main(sys.argv[1:])

Now, run above script as follows:

$ test.py -h

usage: test.py -i <inputfile> -o <outputfile>

$ test.py -i BMP -o

usage: test.py -i <inputfile> -o <outputfile>

$ test.py -i inputfile

Input file is " inputfile

Output file is "

TUTORIALS POINT

Simply Easy Learning

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!