Did I find the right examples for you? yes no

All Samples(1)  |  Call(1)  |  Derive(0)  |  Import(0)
Sets the mode of the executor.
params:
    passwd - None (no password) or string (set password)

        def set_mode(passwd):
    """
    Sets the mode of the executor.
    params:
        passwd - None (no password) or string (set password)
    """
    
    module = sys.modules[__name__]
    if passwd:
        module.password = passwd
        module.execute_as_root_simple = _execute_with_password_simple
        module.execute_as_root = _execute_with_password
    else:
        module.execute_as_root_simple = _execute_without_password_simple
        module.execute_as_root = _execute_without_password
        
    module.exec_log = P2PEM.loggs.used_logger
        


src/p/2/P2PEM-0.1/P2PEM/manager/manager.py   P2PEM(Download)
        loggs.used_logger = self._tor_get_logger(log or self.DEFAULT_LOG)
 
        executor.set_mode(sudo_passwd) 
 
        self.man_logger = loggs.used_logger