[BangPypers] re module help
bugcy013 at gmail.com
Mon Jan 9 10:33:54 CET 2012
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.
More information about the BangPypers