def _on_return(self, text):
<EOL>if not text:<EOL><INDENT>return<EOL><DEDENT>elif text.startswith('<STR_LIT>') and len(text.split('<STR_LIT:U+0020>')) == <NUM_LIT:2>:<EOL><INDENT>filename = text.split('<STR_LIT:U+0020>')[<NUM_LIT:1>]<EOL>image_file = open(filename, '<STR_LIT:rb>')<EOL>text = '<STR_LIT>'<EOL><DEDENT>else:<EOL><INDENT>image_file = None<EOL><DEDENT>text = replace_emoticons(text)<EOL>segments = hangups.ChatMessageSegment.from_str(text)<EOL>self._coroutine_queue.put(<EOL>self._handle_send_message(<EOL>self._conversation.send_message(<EOL>segments, image_file=image_file<EOL>)<EOL>)<EOL>)<EOL>
Called when the user presses return on the send message widget.