Example #1
0
 def __repr__(self):
     return unwrap("""\
         |LabRAD Setting: "%s" >> "%s" (ID=%d)
         |
         |%s
         |
         |Accepts:
         |%s
         |
         |Returns:
         |%s
         |
         |%s """) % (self._server.name, self.name, self.ID,
                     self.description, indent('\n'.join(self.accepts)),
                     indent('\n'.join(self.returns)), self.notes)
Example #2
0
 def __repr__(self):
     return unwrap("""\
         |LabRAD Setting: "%s" >> "%s" (ID=%d)
         |
         |%s
         |
         |Accepts:
         |%s
         |
         |Returns:
         |%s
         |
         |%s """) % (self._server.name, self.name, self.ID, self.description,
                     indent('\n'.join(self.accepts)),
                     indent('\n'.join(self.returns)), self.notes)
Example #3
0
 def __repr__(self):
     data_str = '\n'.join(self._recordRepr(*rec) for rec in self._packet)
     return unwrap("""\
         |Packet for server: '%s'
         |
         |Data:
         |%s""") % (self._server.name, indent(data_str))
Example #4
0
 def __repr__(self):
     self._refresh()
     return unwrap("""\
         |LabRAD Server: %s (ID=%d)
         |
         |%s
         |
         |Settings:
         |%s""") % (self.name, self.ID, self.__doc__,
                    indent(repr(self.settings)))
Example #5
0
 def __repr__(self):
     self._refresh()
     return unwrap("""\
         |LabRAD Server: %s (ID=%d)
         |
         |%s
         |
         |Settings:
         |%s""") % (self.name, self.ID, self.__doc__,
                    indent(repr(self.settings)))
Example #6
0
    def __repr__(self, short=False):
        """Create a string representation of this packet.

        Includes the server the packet is intended for, as well as all the
        records that have been added to the packet.
        """
        data_str = '\n'.join(self._recordRepr(rec, short=short) for rec in self._packet)
        return unwrap("""\
            |Packet for server: '%s'
            |
            |Data:
            |%s""") % (self._server.name, indent(data_str))
Example #7
0
    def __repr__(self, short=False):
        """Create a string representation of this packet.

        Includes the server the packet is intended for, as well as all the
        records that have been added to the packet.
        """
        data_str = '\n'.join(self._recordRepr(rec, short=short) for rec in self._packet)
        return unwrap("""\
            |Packet for server: '%s'
            |
            |Data:
            |%s""") % (self._server.name, indent(data_str))
Example #8
0
 def __repr__(self):
     if self.connected:
         return unwrap("""\
             |LabRAD Client: '%s' on %s:%s
             |
             |Available servers:
             |%s""") % (self.name, self.host, self.port,
                        indent(repr(self.servers)))
     else:
         return unwrap("""\
             |LabRAD Client: '%s'
             |
             |Disconnected""") % self.name
Example #9
0
 def __repr__(self):
     if self.connected:
         return unwrap("""\
             |LabRAD Client: '%s' on %s:%s
             |
             |Available servers:
             |%s""") % (self.name, self.host, self.port,
                        indent(repr(self.servers)))
     else:
         return unwrap("""\
             |LabRAD Client: '%s'
             |
             |Disconnected""") % self.name