How to pass Command Line Arguments to Python File in terminal

Hello Everyone, I want to read data and store it in csv file from the database using python script.But I am unable to do it with XRun Command.

Nothing happened when executed below commands:
Ui Vision script:

{
“Command”: “store”,
“Target”: “‘select count(*) from configurations’”,
“Value”: “query”,
“Description”: “”
},
{
“Command”: “XRun”,
“Target”: “/usr/bin/python3.6”,
“Value”: “/home/jigsaw/Desktop/uivision/dbpy.py ${query}”,
“Description”: “”
},

Does this post help?

No its not working like that

No, How can we define exit code in python script? Its connecting with script via Xrunand wait.