- #!/usr/bin/python3
- import sys
- def easyOptionsArgs(lookingFor,theArgs):
- n = len(theArgs)
- theValue=""
- for i in range(1, n):
- if (sys.argv[i].startswith(lookingFor)):
- theValue=sys.argv[i].split("=")
- return theValue[1:][0]
- return theValue
- def main():
- InFileName = easyOptionsArgs("-f",sys.argv)
- print("InFileName",InFileName)
- if __name__ == "__main__":
- main()
EasyOptionsArgs
Posted by Anonymous on Mon 12th Apr 2021 18:07
raw | new post
view followups (newest first): IfNotFoundDo by Anonymous
Submit a correction or amendment below (click here to make a fresh posting)
After submitting an amendment, you'll be able to view the differences between the old and new posts easily.