[BangPypers] re module help
Ganesh Kumar
bugcy013 at gmail.com
Mon Jan 9 10:33:54 CET 2012
Hi sir,
I tried also subprocess module, But didn't got result, I tried the same
pattern. But didn't match the string over the stream.
> >>> import subprocess
> >>> s = subprocess.Popen(["head", "/etc/hosts"], stdout = subprocess.PIPE)
> >>> hosts_head = s.stdout.read()
> >>> print hosts_head
> 127.0.0.1 localhost
>
> [...]
>
> Use that get your output and then parse it with the regexp.
>
http://dpaste.com/684339/
>
>
>
-Ganesh.
More information about the BangPypers
mailing list