How do you conver output of "popen('ls')" to a list?
wolfson at uchicago.edu
Thu Feb 21 01:48:55 CET 2002
On Wed, 20 Feb 2002 06:09:26 -0600, husam wrote:
> os.listdir('.') gets you all the files in the '.' dircetory. This want
> work if i want to process some selected files. In contrast to this,
> "os.popen() allows you to pass arguments like "ls *txt" to retrieve only
> *.txt files.
In that case, you may want to try glob.glob().
BEN WOLFSON HAS RUINED ROCK MUSIC FOR A GENERATION
-- Crgre Jvyyneq
More information about the Python-list