#NEWLINE# def data_out( self , text = None , **kwargs ) : #NEWLINE# #INDENT# "\n        Data Evennia -> User access hook. 'data' argument is a dict\n        parsed for string settings.\n\n        Kwargs:\n            text (str): Text to send.\n            raw (bool): Leave all ansi markup and tokens unparsed\n            nomarkup (bool): Remove all ansi markup.\n\n        " #NEWLINE# try : #NEWLINE# #INDENT# text = utils . to_str ( ( text if text else '' ) , encoding = self . encoding ) #NEWLINE# #UNINDENT# except Exception as e : #NEWLINE# #INDENT# self . lineSend ( str ( e ) ) #NEWLINE# return #NEWLINE# #UNINDENT# raw = kwargs . get ( 'raw' , False ) #NEWLINE# nomarkup = kwargs . get ( 'nomarkup' , False ) #NEWLINE# if raw : #NEWLINE# #INDENT# self . lineSend ( text ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# self . lineSend ( ansi . parse_ansi ( ( text . strip ( '{r' ) + '{r' ) , strip_ansi = nomarkup ) )