I am calling a python script from a ruby program as:
sku = ["VLJAI20225", "VJLS1234"]
qty = ["3", "7"]
system "python2 /home/nish/stuff/repos/Untitled/voylla_staging_changes/app/models/ReviseItem.py #{sku} #{qtys}"
But I'd like to access the array elements in the python script.
print sys.argv[1]
#gives [VLJAI20225, expected ["VLJAI20225", "VJLS1234"]
print sys.argv[2]
#gives VJLS1234] expected ["3", "7"]
I feel that the space between the array elements is treating the array elements as separate arguments. I may be wrong.
How can I pass the array correctly?