Regular expression issue

2010-02-24 Thread Ashok Prabhu
Hi, The following is a sample of my problem. I get input from user and store it in variable 'b'. I want to match the user input with the contents of another variable 'a'. However I m not able to get the exact match. Could someone help? >>> print a c c+ >>> b 'c+' >>> re.search(b,a).group() 'c'

Re: Repost: Read a running process output

2010-02-05 Thread Ashok Prabhu
On Feb 5, 6:33 pm, Ashok Prabhu wrote: > On Feb 5, 5:58 pm, Alain Ketterlin > wrote: > > > > > Ashok Prabhu writes: > > >> > p1=Popen('/usr/sunvts/bin/64/vtsk -d',stdout=PIPE,shell=True) > > > >> Use Popen(['/usr/...',

Re: Repost: Read a running process output

2010-02-05 Thread Ashok Prabhu
On Feb 5, 5:58 pm, Alain Ketterlin wrote: > Ashok Prabhu writes: > >> > p1=Popen('/usr/sunvts/bin/64/vtsk -d',stdout=PIPE,shell=True) > > >> Use Popen(['/usr/...','-d'],stdout=PIPE), i.e., no shell. > > >> -- Alain. > >

Re: Repost: Read a running process output

2010-02-05 Thread Ashok Prabhu
On Feb 5, 5:12 pm, Alain Ketterlin wrote: > Ashok Prabhu writes: > > from subprocess import * > > p1=Popen('/usr/sunvts/bin/64/vtsk -d',stdout=PIPE,shell=True) > > Use Popen(['/usr/...','-d'],stdout=PIPE), i.e., no shell. > > -- Alain.

Repost: Read a running process output

2010-02-05 Thread Ashok Prabhu
Hi, I very badly need this to work. I have been googling out for a week with no significant solution. I open a process p1 which does keeps running for 4+ hours. It gives some output in stdout now and then. I open this process with subprocess.Popen and redirect the stdout to PIPE. However when I re

read a process output with subprocess.Popen

2010-02-04 Thread Ashok Prabhu
Hi, I m trying a read the output of a process which is running continuously with subprocess.Popen. However the readline() method hangs for the process to finish. Please let me know if the following code can be made to work with subprocess.Popen with threads or queues. I tried a lot of methods but