コード例 #1
0
ファイル: protocol.py プロジェクト: MostAwesomeDude/madcap
    def sendLine(self, line):
        """
        Log sent lines.
        """

        log.msg("%s < %r" % (self.sid, line))
        LineOnlyReceiver.sendLine(self, line)
コード例 #2
0
ファイル: line.py プロジェクト: jjconti/twisted-examples
 def sendLine(self, line):
     # Si la linea ya viene con \r\n, se la quieto por que
     # sendLine se lo agrega.
     if line.endswith('\r\n'):
         line = line[:-2]
     log.msg("=> %s" % line, system=self.get_ccc())
     LineOnlyReceiver.sendLine(self, line)
コード例 #3
0
    def sendLine(self, line):
        """
        Override sendLine method
        """

        if not self._current:
            self.setTimeout(self.persistentTimeOut)

        if not isinstance(line, str):
            return fail(
                ClientError("Invalid type for value: %s, expecting a string" %
                            (type(line), )))
        LineOnlyReceiver.sendLine(self, line)
        cmdObj = Command(line)
        self._current.append(cmdObj)
        return cmdObj._deferred
コード例 #4
0
ファイル: unreal.py プロジェクト: Achilles-96/dtella
 def sendLine(self, line):
     line = line.replace('\r', '').replace('\n', '')
     if self.showirc:
         LOG.log(5, "<: %s" % line)
     LineOnlyReceiver.sendLine(self, line)
コード例 #5
0
ファイル: dc.py プロジェクト: LiPeK/dtella
 def sendLine(self, line):
     #print "<:", line
     LineOnlyReceiver.sendLine(self, line.replace('|','&#124;'))
コード例 #6
0
 def sendLine(self, line):
     self.log.trace("-> %s" % repr(line))
     LineOnlyReceiver.sendLine(self, line)
コード例 #7
0
 def sendLine(self, line):
     print 'S: ' + line
     print "Enviar?"
     raw_input()
     LineOnlyReceiver.sendLine(self, line)
コード例 #8
0
 def sendLine(self, line):
     print 'S: ' + line
     if not self.saludo: LineOnlyReceiver.sendLine(self, line)        # Saludo y nada m?s para no hacer tanto ruido
コード例 #9
0
ファイル: connection.py プロジェクト: btrzcinski/netchat
 def sendLine(self, line):
     LineOnlyReceiver.sendLine(self, str(line))
コード例 #10
0
ファイル: unreal.py プロジェクト: pinkeshbadjatiya/dtella
 def sendLine(self, line):
     line = line.replace('\r', '').replace('\n', '')
     if self.showirc:
         LOG.log(5, "<: %s" % line)
     LineOnlyReceiver.sendLine(self, line)
コード例 #11
0
 def sendLine(self, line):
     if not isinstance(line, str):
         line = str(line)
     LineOnlyReceiver.sendLine(self, line)
コード例 #12
0
ファイル: protocol.py プロジェクト: EionRobb/Ultros-contrib
 def sendLine(self, line):
     self.log.trace("-> %s" % repr(line))
     LineOnlyReceiver.sendLine(self, line)
コード例 #13
0
 def sendLine(self, line): # overrides twisted function
     peer = self.transport.getPeer()
     logging.debug("Sending line '{}' to {}:{}:{}".format(line, peer.type, peer.host, peer.port))
     return LineOnlyReceiver.sendLine(self, line)
コード例 #14
0
 def sendLine(self, line):
     #print "<:", line
     LineOnlyReceiver.sendLine(self, line.replace('|', '&#124;'))
コード例 #15
0
ファイル: unreal.py プロジェクト: infinity0/dtella
 def sendLine(self, line):
     line = line.replace("\r", "").replace("\n", "")
     if self.showirc:
         LOG.log(5, "<: %s" % line)
     LineOnlyReceiver.sendLine(self, line)