def sendLine(self, line):
        """
        (Private) Encodes and sends a line

        @param line: L{bytes} or L{unicode}
        """
        if isinstance(line, unicode):
            line = line.encode(self._encoding)
        super(FTP, self).sendLine(line)

        (Private) Encodes and sends a line

        @param line: L{bytes} or L{unicode}
        
stackoverflow/venv/lib/python3.6/site-packages/twisted/protocols/ftp.py