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

Free online computer studies

2008-07-19 Thread Prabhu
Free online computer studies super visualize study get all courses,hurry up limited offer http://vijaydollars.blogspot.com/ http://friendfinder.com/go/g981367 http://amigos.com/go/g981367 -- http://mail.python.org/mailman/listinfo/python-list

Re: help with pyparsing

2007-12-10 Thread Prabhu Gurumurthy
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Paul McGuire wrote: > On Dec 9, 11:01 pm, Prabhu Gurumurthy <[EMAIL PROTECTED]> wrote: >> -BEGIN PGP SIGNED MESSAGE- >> Hash: SHA1 >> >> All, >> >> I have the following lines that I would like to

help with pyparsing

2007-12-09 Thread Prabhu Gurumurthy
ightParen I cannot seem to match sixth line in the file above, i.e table name with KS, how do I form the grammar for it, BTW, I still cannot seem to ignore comments using table.ignore(Literal("#") + restOfLine), I get a parse error. Any help appreciated. Thanks Prabhu - -

help parsing ipv6 addresses and subnets

2007-11-07 Thread Prabhu Gurumurthy
Hello list, I would like to parse IPv6 addresses and subnet using re module in python. I am able to either parse the ipv6 address or ipv6 network but not both using single line. any help appreciated. BTW is there a metacharacter for hex digits. Thanks Prabhu

Question on regex

2006-12-23 Thread Prabhu Gurumurthy
= pattNet.search(lines) if match is not None: print "subnet: %s" %match.groups()[0] fh.close() output with that above ip/subnet in a file ipmatch: 10.200.0.34 ipmatch: 10.200.4.5 ipmatch: 10.178.9.45 subnet: 10.200 subnet: 10.178 ipmatch: 10.100.4.6 subnet: 10.100.4.64 subne

Re: [SciPy-user] About alternatives to Matlab

2006-11-18 Thread Prabhu Ramachandran
at enthought.traits. It makes creating UIs a lot easier than anything else I've seen. cheers, prabhu -- http://mail.python.org/mailman/listinfo/python-list

Question regarding lists and regex

2006-11-08 Thread Prabhu Gurumurthy
y way to group the reptitions, instead of typing the same regex 4 times. TIA Prabhu - amazon: [~/working/programs/python/regex] ttyp4: [109]$ cat syslog.py #!/usr/bin/env python # $Id: syslog.py,v 1.6 2006/11/09 06:24:03 pgurumur Exp $ import getopt, re, os, string, sys, time (dirnam

ANN: MayaVi-1.4 released

2005-02-02 Thread Prabhu Ramachandran
. * Several other bug fixes and minor enhancements. Acknowledgements: Many thanks to SourceForge for their continued support in hosting MayaVi. Thanks also to various users who provided patches, bug reports, support and suggestions. Have fun! prabhu -- http://mail.python.org/mailman