fparser Reference Guide
0.0.14
|
Public Member Functions | |
def | __init__ (self, is_free, is_strict, enable_f2py=False) |
def | from_mode (cls, mode) |
def | __eq__ (self, other) |
def | __str__ (self) |
def | is_free (self) |
def | is_fixed (self) |
def | is_strict (self) |
def | is_f77 (self) |
def | is_fix (self) |
def | is_pyf (self) |
def | f2py_enabled (self) |
def | mode (self) |
Public Attributes | |
is_free | |
is_strict | |
f2py_enabled | |
Describes the nature of a piece of Fortran source. Source can be fixed or free format. It can also be "strict" or "not strict" although it's not entirely clear what that means. It may refer to the strictness of adherance to fixed format although what that means in the context of free format I don't know. :param bool is_free: True for free format, False for fixed. :param bool is_strict: some amount of strictness. :param bool enable_f2py: whether f2py directives are enabled or treated \ as comments (the default).
Definition at line 79 of file sourceinfo.py.
def fparser.common.sourceinfo.FortranFormat.f2py_enabled | ( | self | ) |
:returns: whether or not f2py directives are enabled. :rtype: bool
Definition at line 189 of file sourceinfo.py.
References fparser.common.sourceinfo.FortranFormat._f2py_enabled.
def fparser.common.sourceinfo.FortranFormat.from_mode | ( | cls, | |
mode | |||
) |
Constructs a FortranFormat object from a mode string. Arguments: mode - (String) One of 'free', 'fix', 'f77' or 'pyf'
Definition at line 105 of file sourceinfo.py.
References fparser.common.sourceinfo.FortranFormat.f2py_enabled, fparser.common.sourceinfo.FortranFormat.is_free, and fparser.common.sourceinfo.FortranFormat.is_strict.
def fparser.common.sourceinfo.FortranFormat.is_f77 | ( | self | ) |
Returns true for strict fixed format.
Definition at line 168 of file sourceinfo.py.
References fparser.common.sourceinfo.FortranFormat._is_free, and fparser.common.sourceinfo.FortranFormat._is_strict.
def fparser.common.sourceinfo.FortranFormat.is_fix | ( | self | ) |
Returns true for slack fixed format.
Definition at line 175 of file sourceinfo.py.
References fparser.common.sourceinfo.FortranFormat._is_free, and fparser.common.sourceinfo.FortranFormat._is_strict.
def fparser.common.sourceinfo.FortranFormat.is_fixed | ( | self | ) |
Returns true for fixed format.
Definition at line 154 of file sourceinfo.py.
References fparser.common.sourceinfo.FortranFormat._is_free.
def fparser.common.sourceinfo.FortranFormat.is_free | ( | self | ) |
Returns true for free format.
Definition at line 147 of file sourceinfo.py.
References fparser.common.sourceinfo.FortranFormat._is_free.
def fparser.common.sourceinfo.FortranFormat.is_pyf | ( | self | ) |
Returns true for strict free format.
Definition at line 182 of file sourceinfo.py.
References fparser.common.sourceinfo.FortranFormat._is_free, and fparser.common.sourceinfo.FortranFormat._is_strict.
def fparser.common.sourceinfo.FortranFormat.is_strict | ( | self | ) |
Returns true for strict format.
Definition at line 161 of file sourceinfo.py.
References fparser.common.sourceinfo.FortranFormat._is_strict.
def fparser.common.sourceinfo.FortranFormat.mode | ( | self | ) |
Returns a string representing this format.
Definition at line 197 of file sourceinfo.py.
References fparser.common.sourceinfo.FortranFormat._is_free, fparser.common.sourceinfo.FortranFormat._is_strict, fparser.common.sourceinfo.FortranFormat.is_f77(), and fparser.common.sourceinfo.FortranFormat.is_fix().