Mercurial > pytave
changeset 285:06a4b461b141
pyobject: hide methods which start with underscore (fixes issue #23)
* @pyobject/methods.m: Hide methods.
author | Colin Macdonald <cbm@m.fsf.org> |
---|---|
date | Tue, 02 Aug 2016 00:06:42 -0700 |
parents | 6c133bcac33a |
children | 9e8faa439d1d |
files | @pyobject/methods.m |
diffstat | 1 files changed, 1 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/@pyobject/methods.m Tue Aug 02 00:03:51 2016 -0700 +++ b/@pyobject/methods.m Tue Aug 02 00:06:42 2016 -0700 @@ -69,7 +69,7 @@ # filter the output of `dir(x)` to get callable methods only cmd = pyeval (["lambda x: [a for a in dir(x)" ... - " if callable(getattr(x, a)) and not a.startswith('__')]"]); + " if callable(getattr(x, a)) and not a.startswith('_')]"]); # FIXME: may need to convert from Python list to Octave cell array mtds_list = pycall (cmd, x)