Re: The original command python line

2012-03-04 Thread Grant Edwards
On 2012-03-04, Chris Rebert wrote: > On Sat, Mar 3, 2012 at 9:38 PM, Damjan Georgievski wrote: >> How can I get the *really* original command line that started my python >> interpreter? > On Linux, you can read from: > /proc//cmdline > to get the null-delimited "command line". And if what y

Re: The original command python line

2012-03-03 Thread Devin Jeanpierre
On Sun, Mar 4, 2012 at 1:20 AM, Damjan Georgievski wrote: > How come? > I'm using explicit relative imports, I thought they were the new thing? Explicit relative imports are fine. Implicit relative imports can create multiple module objects for the same source file, which breaks things like excep

Re: The original command python line

2012-03-03 Thread Damjan Georgievski
>>> How can I get the *really* original command line that started my python >>> interpreter? > >> On Linux, you can read from: >>/proc//cmdline >> to get the null-delimited "command line". > > After some further searching: > psutil offers `Process.cmdline` cross-platform; > see http://code.go

Re: The original command python line

2012-03-03 Thread Chris Rebert
On Sat, Mar 3, 2012 at 9:48 PM, Chris Rebert wrote: > On Sat, Mar 3, 2012 at 9:38 PM, Damjan Georgievski wrote: >> How can I get the *really* original command line that started my python >> interpreter? > On Linux, you can read from: >    /proc//cmdline > to get the null-delimited "command line"

Re: The original command python line

2012-03-03 Thread Chris Rebert
On Sat, Mar 3, 2012 at 9:38 PM, Damjan Georgievski wrote: > How can I get the *really* original command line that started my python > interpreter? > > Werkzeug has a WSGI server which reloads itself when files are changed > on disk. It uses `args = [sys.executable] + sys.argv` to kind of > recreat

The original command python line

2012-03-03 Thread Damjan Georgievski
How can I get the *really* original command line that started my python interpreter? Werkzeug has a WSGI server which reloads itself when files are changed on disk. It uses `args = [sys.executable] + sys.argv` to kind of recreate the command line, and the uses subprocess.call to run that command l