peter at engcorp.com
Sun Jun 8 05:28:46 CEST 2003
> "Peter Hansen" <peter at engcorp.com> wrote in message
> news:3EE28ABC.7D6DB511 at engcorp.com...
> > kpop wrote:
> > >
> > > how do i get the path of the python script thats running from within
> > > python.
> > Do you mean the path of any Python module that is imported, or just
> > the main script. For the latter, use sys.argv.
> > -Peter
> no just the main script thanks peter
Good... in that case, usually this is enough:
scriptPath = os.path.abspath(sys.argv)
More information about the Python-list