Re: Oserror: [Errno 20]

2006-04-03 Thread Scott David Daniels
Peter Hansen wrote: > k r fry wrote: >> Hi, I am new to this list and also programming with python. >> I have an error: oserror [errno 20] not a directory "katiescint.py" >> The piece of code causing the problem is: >> [code] >> >> for subdir in os.listdir(DATADIR): #loop through list

Re: Oserror: [Errno 20]

2006-04-03 Thread k r fry
Thank you very much! I really appreciate the help. :) -- http://mail.python.org/mailman/listinfo/python-list

Re: Oserror: [Errno 20]

2006-04-03 Thread Ben Thul
I think that if you go back and look at the original reply, he spelled it "isdir"...;) --Ben k r fry wrote: > Again, I apologise. Not knowing much about Python means that I don't > know what needs to be provided. I meant it doesn't work in the same way > that "istdir" didn't work. > > Here i

Re: Oserror: [Errno 20]

2006-04-03 Thread Peter Hansen
k r fry wrote: > Sorry for not copying the whole traceback before, I hop I have done it > right this time. > > I am now getting: > > Traceback (most recent call last): >File "katiescint.py", line 153, in ? > for subdir in os.path.istdir(DATADIR): #loop through > list of st

Re: Oserror: [Errno 20]

2006-04-03 Thread k r fry
Thank you very much! *embarassed*. :-) Ben Thul wrote: > I think that if you go back and look at the original reply, he spelled > it "isdir"...;) > > --Ben > k r fry wrote: > >> Again, I apologise. Not knowing much about Python means that I don't >> know what needs to be provided. I meant

Re: Oserror: [Errno 20]

2006-04-03 Thread Sybren Stuvel
k r fry enlightened us with: > Traceback (most recent call last): >File "katiescint.py", line 153, in ? > for subdir in os.path.listdir(DATADIR): #loop through > list of strings > AttributeError: 'module' object has no attribute 'listdir' But why do you use that function the

Re: Oserror: [Errno 20]

2006-04-03 Thread k r fry
Again, I apologise. Not knowing much about Python means that I don't know what needs to be provided. I meant it doesn't work in the same way that "istdir" didn't work. Here is what I have coded: for subdir in os.path.istdir(DATADIR): #loop through list of strings file=FITS

Re: Oserror: [Errno 20]

2006-04-03 Thread Sybren Stuvel
k r fry enlightened us with: > I did think maybe it was meant to be "listdir" instead of "istdir", > but that doesn't work either. And again you don't tell us in what way it doesn't work. Think about what you post from our point of view. Then re-read it, and think about it again. Only if you're s

Re: Oserror: [Errno 20]

2006-04-03 Thread k r fry
Sorry for not copying the whole traceback before, I hop I have done it right this time. I am now getting: Traceback (most recent call last): File "katiescint.py", line 153, in ? for subdir in os.path.istdir(DATADIR): #loop through list of strings AttributeError: 'module' ob

Re: Oserror: [Errno 20]

2006-04-03 Thread Peter Hansen
k r fry wrote: > Hi, I am new to this list and also programming with python. > > I have an error: oserror [errno 20] not a directory "katiescint.py" Please always post complete tracebacks, and without manually reentering the data. In most cases you'll save us and you lots of time and guessing.