I just need a hint on how to do things properly.
Say I have a script called script.py which uses a list of names as argument ["name1", "name2", etc. ].
I want to call this script from another script using the subprocess module. So what I would like to do is the following :
myList = ["name1", "name2", "name3"]
subprocess.Popen(["python", "script.py", myList])
Of course that doesn't work because the subprocess.Popen method requires a list of strings as arguments. So I considered doing the following :
subprocess.Popen(["python", "script.py", str(myList)])
Now the process starts but it doesn't work because it has a string as argument and not a list. How should I fix that properly?