Run py file with different arguments each time in pyCharm
Question: I have some script : **run.py** , I was using it in terminal like :

    
    
    python run.py -t 10 -s adidas -f mozilla
    python run.py -t 2 -s nike -f chrome
    python run.py -t 100 -s puma -f safari
    python run.py -t 1 -s tom
    

but how to live in pyCharm? I need each time to configure Run/Debug
configuration ? Thanx


Answer: easiest is to make a runner file

**testrunner.py** (same folder as run.py)

    
    
    import .run
    args= [ "-t 10 -s adidas -f mozilla","-t 2 -s nike -f chrome","-t 100 -s puma -f safari"]
    for arg in args:
        sys.argv[1:] = arg.split()
        reload(run)
        run.main()        
    

or you can use `os.system` to call it with the arguments, but you lose alot of
the debugging features of pycharm doing that ...

or alternatively you could make 1 run config for each set of paramaters and
save the run config(this is probably how pycharm expects you to do it)

