def write(self, cmd='<STR_LIT>'):
self.cmd_response = '<STR_LIT>'<EOL>self.cmd_responselines = []<EOL>if self.ser is None:<EOL><INDENT>return <NUM_LIT:0><EOL><DEDENT>cmd += '<STR_LIT:\r\n>'<EOL>return self.ser.write(cmd.encode())<EOL>
write string to modem, returns number of bytes written.