stupid question about os.listdir
eat at joes.com
Fri Jun 27 05:02:53 CEST 2003
John Hunter wrote:
>>>>>>"Jason" == Jason Kratz <eat at joes.com> writes:
> Jason> oops. almost forgot. if I run interactively in the python
> Jason> interpreter it works as I expect. its when doing 'python
> Jason> script.py' 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 scriptname.py
> 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
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