Finding the Process Path

Peck, Jon peck at spss.com
Mon Oct 3 09:33:00 EDT 2005


Thanks, but this doesn't tell me what I am looking for.

I am looking for the path for the current process (which will not be the Python interpreter).

I see, though, that this is available as sys.executable

Regards,
Jon Peck

-----Original Message-----
From: python-list-bounces+jkpeck=aya.yale.edu at python.org [mailto:python-list-bounces+jkpeck=aya.yale.edu at python.org] On Behalf Of gene tani
Sent: Monday, October 03, 2005 7:39 AM
To: python-list at python.org
Subject: Re: Finding the Process Path

other ways to get at info:

if sys.hexversion > 0x010502F0:

sys.versioninfo, version, etc.

platform.architecture, processor etc.

distutils.sysconfig.get_makefile_filename(  )

Benji York wrote:
> Peck, Jon wrote:
> > I have Python code running in an application, and I would like to find
> > the full path of the process executable where it is running.
>
> Like this?
>
>  >>> import sys
>  >>> sys.executable
> '/usr/bin/python'
> --
> Benji York

-- 
http://mail.python.org/mailman/listinfo/python-list



More information about the Python-list mailing list