libqtile/command.py
def cmd_eval(self, code):
        """Evaluates code in the same context as this function

        Return value is tuple `(success, result)`, success being a boolean and
        result being a string representing the return value of eval, or None if
        exec was used instead.
        """
        try:
            try:
                return (True, str(eval(code)))
            except SyntaxError:
                exec(code)
                return (True, None)
        except:  # noqa: E722
            error = traceback.format_exc().strip().split("\n")[-1]
            return (False, error)
Evaluates code in the same context as this function

        Return value is tuple `(success, result)`, success being a boolean and
        result being a string representing the return value of eval, or None if
        exec was used instead.
        
Evaluates code in the same context as this function
Return value is tuple `(success, result)`, success being a boolean and
result being a string representing the return value of eval, or None if
exec was used instead.
Evaluates code in the same context as this function Return value is tuple ` ( success result ) ` success being a boolean and result being a string representing the return value of eval or None if exec was used instead .
def cmd_eval(self, code):
        try:
            try:
                return (True, str(eval(code)))
            except SyntaxError:
                exec(code)
                return (True, None)
        except:  
            error = traceback.format_exc().strip().split("\n")[-1]
            return (False, error)
def cmd_eval ( self , code ) : try : try : return ( True , str ( eval ( code ) ) ) except SyntaxError : exec ( code ) return ( True , None ) except : error = traceback . format_exc ( ) . strip ( ) . split ( "\n" ) [ - 1 ] return ( False , error )
Evaluates code in the same context as this function
Return value is tuple `(success, result)`, success being a boolean and
result being a string representing the return value of eval, or None if
exec was used instead.
Evaluates code in the same context as this function Return value is tuple ` ( success result ) ` success being a boolean and result being a string representing the return value of eval or None if exec was used instead .
"""Evaluates code in the same context as this function

        Return value is tuple `(success, result)`, success being a boolean and
        result being a string representing the return value of eval, or None if
        exec was used instead.
        """ # noqa: E722
self
code