python:pythonbasicexamples
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
python:pythonbasicexamples [2020/02/26 16:01] – [Read and Update File] admin | python:pythonbasicexamples [2022/10/29 16:15] (current) – external edit 127.0.0.1 | ||
---|---|---|---|
Line 220: | Line 220: | ||
</ | </ | ||
===== Python Command Line Arguments ===== | ===== Python Command Line Arguments ===== | ||
+ | refer: https:// | ||
+ | |||
Consider we want to pass two file names through command line and we also want to give an option to check the usage of the script. Usage of the script is as follows − | Consider we want to pass two file names through command line and we also want to give an option to check the usage of the script. Usage of the script is as follows − | ||
<code bash> | <code bash> | ||
Line 256: | Line 258: | ||
$ test.py -h | $ test.py -h | ||
</ | </ | ||
- | usage: | + | test.py -i < |
</ | </ | ||
* Option2:< | * Option2:< | ||
- | $ test.py -i BMP -o | ||
- | |||
- | usage: test.py -i < | ||
- | |||
$ test.py -i inputfile | $ test.py -i inputfile | ||
+ | </ | ||
Input file is " inputfile | Input file is " inputfile | ||
Output file is " | Output file is " | ||
+ | </ |
python/pythonbasicexamples.1582732891.txt.gz · Last modified: 2022/10/29 16:15 (external edit)