How to Access Unix Shell
Miki Tebeka
miki.tebeka at zoran.com
Mon Jun 14 03:35:01 EDT 2004
Hello PaxDiablo,
> How about?
> =====
> import os
> pipeLine = os.popen("ls -1","r")
> curLine = pipeLine.readline()
> while curLine:
> print "Got file [%s]"%(curLine[:-1])
> curLine = pipeLine.readline()
> pipeLine.close()
> =====
How about :
===
files = os.listdir(".")
===
Bye.
--
-------------------------------------------------------------------------
Miki Tebeka <miki.tebeka at zoran.com>
The only difference between children and adults is the price of the toys.
More information about the Python-list
mailing list