I got answer for how to pass file as argument here How to access variables from file passed through command line
But I am asking separately since don't wanna mix two.
I am able to access variables in passed file as __import__(sys.argv[1])
and called python test.py config
. But can I call config.py file by giving pythonpath? e/g/ python test.py ~/Desktop/config
or PYTHONPATH='~/Desktop/' python test.py config
? Because if I do this I get no module error
.