open("ls -l |", "r") ??

Steve Lamb grey at despair.rpglink.com
Fri Feb 9 19:14:27 CET 2001


On Fri, 09 Feb 2001 17:56:39 GMT, steveFarris <fm_duende at yahoo.com> wrote:
>Hi all, is some variation of  the above possible in Python?

import os
foo = os.popen("ls -l")
for line in foo.readlines():
    print line,

-- 
         Steve C. Lamb         | I'm your priest, I'm your shrink, I'm your
         ICQ: 5107343          | main connection to the switchboard of souls.
-------------------------------+---------------------------------------------



More information about the Python-list mailing list