Oserror: [Errno 20]

k r fry k.r.fry at durham.ac.uk
Mon Apr 3 07:33:27 EDT 2006


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 of 
strings

     file=FITS.Read(DATADIR+'/'+subdir+'/flux.fits')     #opens 
flux.fits file and reads

     summation=open(DATADIR+'/'+subdir+'/flux.dat','w')  #opens the 
summation results file for writing to

     spotbyspot=open(DATADIR+'/'+subdir+'/spotflux.dat','w') #opens the 
spot-by-spot file for writing to

     output=''
     print'\n~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n'+sys.argv[1]+' 
'+subdir+'\n~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n'

[/code]

The first line is the one with the error.  Can anyone help?

Thanks!



More information about the Python-list mailing list