Is there any difference between:
__file__
and
sys.argv[0]
Because both seem to be doing the same thing: they hold the name of the script.
If there is no difference, then why is it that __file__
is used in almost all someplaces whereas I have never seen sys.argv[0]
being used.