diff options
author | Pearu Peterson <pearu.peterson@gmail.com> | 2006-10-04 09:49:54 +0000 |
---|---|---|
committer | Pearu Peterson <pearu.peterson@gmail.com> | 2006-10-04 09:49:54 +0000 |
commit | c620acddd34a07edd6f33baad0adfad6e8cf1bd5 (patch) | |
tree | 3413710782a3f16711c4935cde86fbb5e69c35dd /numpy/f2py/lib/parser/base_classes.py | |
parent | ac93e95702a9047b774b4cdd1838c9e1b1f70739 (diff) | |
download | numpy-c620acddd34a07edd6f33baad0adfad6e8cf1bd5.tar.gz |
F2PY G3: exposed wrappers via f2py script. A working example: wrap F90 module containing derived type with scalar components.
Diffstat (limited to 'numpy/f2py/lib/parser/base_classes.py')
-rw-r--r-- | numpy/f2py/lib/parser/base_classes.py | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/numpy/f2py/lib/parser/base_classes.py b/numpy/f2py/lib/parser/base_classes.py index 7feafd74f..76a26b666 100644 --- a/numpy/f2py/lib/parser/base_classes.py +++ b/numpy/f2py/lib/parser/base_classes.py @@ -122,6 +122,14 @@ class Variable: self.init = None return + def __repr__(self): + l = [] + for a in ['name','typedecl','dimension','bounds','length','attributes','intent','bind','check','init']: + v = getattr(self,a) + if v: + l.append('%s=%r' % (a,v)) + return 'Variable: ' + ', '.join(l) + def get_bit_size(self): typesize = self.typedecl.get_bit_size() if self.is_pointer(): @@ -372,7 +380,7 @@ class Statement: attr = getattr(self, n, None) if not attr: continue if hasattr(attr, 'torepr'): - r = attr.torepr(depht-1,incrtab) + r = attr.torepr(depth-1,incrtab) else: r = repr(attr) l.append(ttab + '%s=%s' % (n, r)) |