I've got the "usual" expected an indented block. All the indentations are right. I've open my script in various editors and there is no issue abt missalignments, or hiden whitespaces caused by tabs.
Would really appreciate if anyone could shed some light on this issue.
This is the part of the script causing problems:
def findCSVs():
'''
looks into a 'tocom_data' subdirectory, finds 'tocomxxx.csv' files,
retuns a sorted list of filenames that conform: begins with TOCOM, ends in .csv
'''
csvlist = []
datadir=os.path.join('.','tocom_data')
flist = os.listdir(datadir)
for fname in flist:
fsplit = fname.split('.')
if len(fsplit)>1:
if fsplit[1]=="csv" and fname[0:5]=="TOCOM":
completeFname= os.path.join(datadir,fname)
csvlist.append(completeFname)
csvlist.sort()
return csvlist
Python expects an indented block at the line if len(fsplit)>1:
Much appreciated
Jose