Mar-12-2020, 06:37 PM
I don't believe that idle (which is not a very good IDE, even though it comes with python) has a mechanism to pass parameters from within the GUI, but you can emulate this by setting sys.argv.
Example:
Example:
>>> import sys >>> >>> sys.argv = [sys.argv[0], '-a', '-b', '-c', 'myfile.txt'] >>> >>> print(sys.argv) ['', '-a', '-b', '-c', 'myfile.txt'] >>>