Re: PEP 405 vs 370

2012-05-27 Thread Damjan Georgievski
http://www.python.org/dev/peps/pep-0405/ I don't get what PEP 405 (Python Virtual Environments) brings vs what we already had in PEP 370 since Python 2.6. Obviously 405 has a tool to create virtual environments, but that's trivial for PEP 370 [1], and has support for isolation from the system-wi

PEP 405 vs 370

2012-05-25 Thread Damjan Georgievski
http://www.python.org/dev/peps/pep-0405/ I don't get what PEP 405 (Python Virtual Environments) brings vs what we already had in PEP 370 since Python 2.6. Obviously 405 has a tool to create virtual environments, but that's trivial for PEP 370 [1], and has support for isolation from the syste

Re: How can I read streaming output of a subprocess

2012-05-02 Thread Damjan Georgievski
I want to read the stream of an external process that I start with Python. From what I've seen that's not possible with the subprocess module? I want to read the output of "ip monitor neigh" which will show changes in the ARP table on my Linux computer. Each change is a new line printed by "ip"

How can I read streaming output of a subprocess

2012-05-02 Thread Damjan Georgievski
I want to read the stream of an external process that I start with Python. From what I've seen that's not possible with the subprocess module? I want to read the output of "ip monitor neigh" which will show changes in the ARP table on my Linux computer. Each change is a new line printed by "ip

Re: Async IO Server with Blocking DB

2012-04-06 Thread Damjan Georgievski
> We are thinking about building a webservice server and considering > python event-driven servers i.e. Gevent/Tornado/ Twisted or some > combination thereof etc. > > We are having doubts about the db io part. Even with connection > pooling and cache, there is a strong chance that server will blo

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 python command 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 th

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