stupid question about os.listdir

Jason Kratz eat at joes.com
Thu Jun 26 22:22:36 EDT 2003


OK. I've search on google groups and around the web for this and I 
haven't found an answer.  I'm a Python newbie and have what I assume is 
a basic question.  os.listdir takes a pathname as an arg but it doesn't 
actually list the contents of the dir I pass in.   it always operates on 
the current dir (wherever the script is run) and I have to chdir 
beforehand.  Is that how its supposed to work?  If so what is the point 
in passing in a pathname?

thanks,

Jason





More information about the Python-list mailing list