def __repr__(self): n = self.__class__.__module__ + '.' + self.__class__.__name__ a = [(attr, getattr(self, attr, None)) for attr in self._payload_attrs] if self._data is not None: a.append(('dtype', str(self._data.dtype))) a.append(('shape', str(self._data.shape))) return tw_fill(_build_repr(n, a), subsequent_indent=' ')
def __str__(self): output = "" if self.help is not None: output += "# %s\n" % tw_fill(self.help, subsequent_indent='# ') section, item = self.name.rsplit('.', 1) if self.value is None: output += "#%s = \n" % item else: output += "%s = %s\n" % (item, self.value) return output
def __repr__(self): n = self.__class__.__module__ + '.' + self.__class__.__name__ a = [(attr, getattr(self, attr, None)) for attr in ('control_instance', 'update_interval')] return tw_fill(_build_repr(n, a), subsequent_indent=' ')
def __repr__(self): n = self.__class__.__module__ + '.' + self.__class__.__name__ a = [(attr, getattr(self, attr, None)) for attr in ('beam', )] return tw_fill(_build_repr(n, a), subsequent_indent=' ')
def __repr__(self): n = self.__class__.__module__+'.'+self.__class__.__name__ a = [(attr,getattr(self, attr, None)) for attr in ('filename', '_changed', '_parameters')] return tw_fill(_build_repr(n,a), subsequent_indent=' ')
def fill(s, w): """Like textwrap.fill, but preserve newlines (\n).""" return "\n".join(tw_fill(p, w) for p in s.split("\n"))
def __repr__(self): output = "<%s filename='%s', start_time='%s', stop_time='%s', reduction=%s>" % ( type(self).__name__, self.filename, self.start_time, self.stop_time, self.reduction) return tw_fill(output, subsequent_indent=' ')
def fill (s, w): """Like textwrap.fill, but preserve newlines (\n).""" return '\n'.join(tw_fill(p, w) for p in s.split('\n'))
def __repr__(self): n = self.__class__.__module__ + '.' + self.__class__.__name__ a = [('header', repr(self.header).replace(',\n ', ', ')), ('payload', repr(self.payload).replace(',\n ', ', ')), ('valid', self.valid)] return tw_fill(_build_repr(n, a), subsequent_indent=' ')
def __repr__(self): output = "<%s at 0x%x>" % (type(self).__name__, id(self)) return tw_fill(output, subsequent_indent=' ')