diff options
author | Pearu Peterson <pearu.peterson@gmail.com> | 2006-06-29 09:33:15 +0000 |
---|---|---|
committer | Pearu Peterson <pearu.peterson@gmail.com> | 2006-06-29 09:33:15 +0000 |
commit | 109772b31ff4c3e755fc21eb2ef3c0db267002ef (patch) | |
tree | f7b4b3c7dfb52bc871f4c0f872378aa71abdd6af /numpy/f2py/lib/sourceinfo.py | |
parent | 9913769d0719b6cfca1b3d51baee8421ba7cf288 (diff) | |
download | numpy-109772b31ff4c3e755fc21eb2ef3c0db267002ef.tar.gz |
Finished impl. Fortran 77-2003 parse pattern classes.
Diffstat (limited to 'numpy/f2py/lib/sourceinfo.py')
-rw-r--r-- | numpy/f2py/lib/sourceinfo.py | 9 |
1 files changed, 3 insertions, 6 deletions
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 |