I know there is some issues with passing in more complicated data structures, such as a list of lists, to a python script via the CLI.
I was wondering if running a python script from node code had any of these same issues.
Basically, say I have the following code in a node app:
const spawn = require("child_process").spawn;
const pythonProcess = spawn('python',["path/to/script.py", arg1, arg2, arg3]);
Question the above code is from
Suppose that arg1 and arg2 are lists of lists in the node app. And suppose arg3 is a double.
The corresponding code in my script.py file that is meant to parse and receive these arguments into variables looks like so:
import sys
if __name__ == '__main__':
oc = sys.argv[1]
nc = sys.argv[2]
r = sys.argv[3]
Will oc and nc here be lists of lists in python? Or does something else need to be done to get this working?