RE: Finding the Process Path

2005-10-03 Thread Peck, Jon
through the interpreter, of course Python is what I get from sys.executable. -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Steve Holden Sent: Monday, October 03, 2005 9:26 AM To: python-list@python.org Subject: Re: Finding the Process Path Peck, Jon

Re: Finding the Process Path

2005-10-03 Thread Steve Holden
Peck, Jon wrote: > 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). > Actually the core image will be that of the Python interpreter. > I see, though, that this is available as sys.executa

RE: Finding the Process Path

2005-10-03 Thread Peck, Jon
EMAIL PROTECTED] On Behalf Of gene tani Sent: Monday, October 03, 2005 7:39 AM To: python-list@python.org Subject: Re: Finding the Process Path other ways to get at info: if sys.hexversion > 0x010502F0: sys.versioninfo, version, etc. platform.architecture, proce

Re: Finding the Process Path

2005-10-03 Thread gene tani
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

Re: Finding the Process Path

2005-10-03 Thread Benji York
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

Finding the Process Path

2005-10-03 Thread Peck, Jon
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.  I can do this with win32api.GetModuleFileName(0) on Windows, but I would like a solution that uses only standard modules and works cross platform.  Any sugges