how do I extract the arguments using getopt
Usage:
test.py -P abc -S def -G xyz
How do I extract the values abc, def and xyz?
If you have access to test.py (the source code I mean) you could modify it to pipe the values to a text file perhaps.
I don't know about getopt but all of those things are stored in the list stored under sys.argv
>>> import sys
>>> sys.argv[0]
>>> len(sys.argv)
Try those lines and then you should be able to handle the command line arguments yourself.
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.