stupid question about os.listdir

Jason Kratz eat at
Fri Jun 27 05:02:53 CEST 2003

John Hunter wrote:
>>>>>>"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
> 2.2.

Hi John.   I posted code in another post.  python is 2.2 on Red Hat 9 
and 2.2 on windows.  same behavior in my script on both.

More information about the Python-list mailing list