Re: getting properly one subprocess output

2009-11-20 Thread Nobody
On Thu, 19 Nov 2009 06:21:09 -0800, Bas wrote: > Below is the script I use to automatically kill firefox if it is not > behaving, maybe you are looking for something similar. > lines = os.popen('ps ax|grep firefox').readlines() This isn't robust. It will kill any process with "firefox" anywhere

Re: getting properly one subprocess output

2009-11-20 Thread Paul Rudin
Jean-Michel Pichavant writes: > Hi python fellows, > > I'm currently inspecting my Linux process list, trying to parse it in > order to get one particular process (and kill it). > I ran into an annoying issue: > The stdout display is somehow truncated (maybe a terminal length > issue, I don't kno

Re: getting properly one subprocess output

2009-11-20 Thread Bas
On Nov 18, 12:25 pm, Jean-Michel Pichavant wrote: > Hi python fellows, > > I'm currently inspecting my Linux process list, trying to parse it in > order to get one particular process (and kill it). > I ran into an annoying issue: > The stdout display is somehow truncated (maybe a terminal length i

Re: getting properly one subprocess output

2009-11-19 Thread Jean-Michel Pichavant
Nobody wrote: On Wed, 18 Nov 2009 12:25:14 +0100, Jean-Michel Pichavant wrote: I'm currently inspecting my Linux process list, trying to parse it in order to get one particular process (and kill it). I ran into an annoying issue: The stdout display is somehow truncated (maybe a terminal len

Re: getting properly one subprocess output

2009-11-18 Thread Nobody
On Wed, 18 Nov 2009 12:25:14 +0100, Jean-Michel Pichavant wrote: > I'm currently inspecting my Linux process list, trying to parse it in > order to get one particular process (and kill it). > I ran into an annoying issue: > The stdout display is somehow truncated (maybe a terminal length issue,

Re: getting properly one subprocess output

2009-11-18 Thread Jon Clements
On Nov 18, 4:14 pm, Jon Clements wrote: > On Nov 18, 11:25 am, Jean-Michel Pichavant > wrote: > > > > > Hi python fellows, > > > I'm currently inspecting my Linux process list, trying to parse it in > > order to get one particular process (and kill it). > > I ran into an annoying issue: > > The s

Re: getting properly one subprocess output

2009-11-18 Thread Jon Clements
On Nov 18, 11:25 am, Jean-Michel Pichavant wrote: > Hi python fellows, > > I'm currently inspecting my Linux process list, trying to parse it in > order to get one particular process (and kill it). > I ran into an annoying issue: > The stdout display is somehow truncated (maybe a terminal length i

getting properly one subprocess output

2009-11-18 Thread Jean-Michel Pichavant
Hi python fellows, I'm currently inspecting my Linux process list, trying to parse it in order to get one particular process (and kill it). I ran into an annoying issue: The stdout display is somehow truncated (maybe a terminal length issue, I don't know), breaking my parsing. import subproc