The original command python line

Chris Rebert clp2 at rebertia.com
Sun Mar 4 00:57:42 EST 2012


On Sat, Mar 3, 2012 at 9:48 PM, Chris Rebert <clp2 at rebertia.com> wrote:
> On Sat, Mar 3, 2012 at 9:38 PM, Damjan Georgievski <gdamjan at gmail.com> wrote:
>> How can I get the *really* original command line that started my python
>> interpreter?
<snip>
> On Linux, you can read from:
>    /proc/<PID here>/cmdline
> to get the null-delimited "command line".

After some further searching:
psutil offers `Process.cmdline` cross-platform;
see http://code.google.com/p/psutil/wiki/Documentation

Cheers,
Chris



More information about the Python-list mailing list