Passing argument to python script for blender through command line


I am trying to run the python script for blender through the command line.
I know for that we need blender -P
But i also want to be able to give parameters of myFile as an input from the command line(For that i used argparse in myFile script).

I try for instance blender -P -arg1 1 -arg2 2.
But command line can not differentiate -arg1 as an argument to instead of blender.

Can you please help me with this issue?

Moved from “General Forums > Blender and CG Discussions” to “Coding > Python Support”

Thank you!