stupid question about os.listdir

John Hunter jdhunter at
Fri Jun 27 04:37:57 CEST 2003

>>>>> "Jason" == Jason Kratz <eat at> writes:

    Jason> oops.  almost forgot.  if I run interactively in the python
    Jason> interpreter it works as I expect.  its when doing 'python
    Jason>' from the command line that it only uses the
    Jason> current directory.

Code, we need more code.  Please post an example, your platform, and
python version.

The following works for me on linux w/ python2.2 called as 
 > python

import os
print os.listdir('/home/jdhunter')
print os.listdir('/home/jdhunter/python')

and the same script (w/ different test paths) works on win32 w/ python


More information about the Python-list mailing list