I am struggling with passing 2 arguments in spyder using the command line. I have used the run-->configuration per file and in the command line options put JPEGtoPNG.py/Poxedex/new/.
The JPEGtoPNG is the python file and the arguments to be passed are poxedex and new.
Dilemma:
When i run print(sys.argv[0])
it prints:
runcell(0, '/Users/chideraokafor/JPEGtoPNG.py')
which i understand is the default.
However when i run print(sys.argv[1])
it prints:
IndexError: list index out of range.
I have tried everything but still, it's not passing the two arguments, and I really don't want to use pycharm.