[Tutor] RE: Newbie question.

Hernan Martinez Foffani hernan@orgmf.com.ar
Mon, 27 May 2002 13:40:23 +0200


> I'm trying to use the os.listdir module to list a directory and then store
> that output to a list. I'm probably doing this wrong:
> X = listdir(/)

I it wasn't answered yet...

Just do:

>>> import os
>>> os.listdir("/")
['.idlerc', ...,
'Windows Update Setup Files', 'WINNT']
>>> 

-Hernan