From 109772b31ff4c3e755fc21eb2ef3c0db267002ef Mon Sep 17 00:00:00 2001 From: Pearu Peterson Date: Thu, 29 Jun 2006 09:33:15 +0000 Subject: Finished impl. Fortran 77-2003 parse pattern classes. --- numpy/f2py/lib/sourceinfo.py | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) (limited to 'numpy/f2py/lib/sourceinfo.py') diff --git a/numpy/f2py/lib/sourceinfo.py b/numpy/f2py/lib/sourceinfo.py index a31c99d73..65b90ca21 100644 --- a/numpy/f2py/lib/sourceinfo.py +++ b/numpy/f2py/lib/sourceinfo.py @@ -52,15 +52,12 @@ def is_free_format(file): isfree = True contline = False while n>0 and line: - if line[0]!='!' and line.strip(): + line = line.rstrip() + if line and line[0]!='!': n -= 1 - if line[0]!='\t' and _free_f90_start(line[:5]) or line[-2:-1]=='&': + if line[0]!='\t' and _free_f90_start(line[:5]) or line[-1:]=='&': isfree = True break - #elif line[-2:-1]=='&': - # contline = True - #else: - # contline = False line = f.readline() f.close() return isfree -- cgit v1.2.1