Quote:
> How does one code the eqivalent of this perl statement in python?
If I understand well that this stores the output from the shell
command "ph any name" in a variable named retval, the solution is
retval = os.popen("ph any name", 'r').read()
Or if you wanted an array of lines, use readlines() instead of read().
python does not strip the final newline in either case.
<http://www.cwi.nl/cwi/people/Guido.van.Rossum.html>