Name of the Script
pearu at cens.ioc.ee
Mon Mar 5 16:17:38 CET 2001
On Mon, 5 Mar 2001, Paul Moore wrote:
> This doesn't always include full pathname information. On Windows,
> --- a.py ---
> import sys
> print sys.argv
> python a.py
> just prints "a.py". Is there a way of getting the *full* script name.
> For example, so that the script can locate a data file which is held
> in the same directory as the script itself.
--- a.py ---
might be what you want.
More information about the Python-list