IDLE: What to use instead of sys.argv ?
samschul at pacbell.net
Sat Aug 28 20:11:09 CEST 1999
"E:\local\Python\Tools\idle\idle.pyw" is the default startup path for IDLE.
i.e. The present distribution places IDLE in the Tools\idle directory.
If what you want is the path of the present script that is loaded, it will
be returned by
sys.path. The problem with this, is that you get all the paths :>)
Svante Kleist <Svante.Kleist at NEMESIS.se> wrote in message
news:MPG.1231b572a3fb6029989682 at news.pi.se...
> Dear Pythoneers,
> From within a Python script executed in IDLE, how can I get
> its path/file? sys.argv gives me this:
> Thanks for any tip.
> / Svante Kleist - NEMESIS systemDesign, Stockholm
More information about the Python-list