(self, prompt="", timeout=None)
Override for a different input source.
        If not timeout and sys.stdin, use raw_input, else use select.
        Returns None on timeout and raises EOFError on close
Override for a different input source.
        If not timeout and sys.stdin, use raw_input, else use select.
        Returns None on timeout and raises EOFError on close
Override for a different input source . If not timeout and sys . stdin use raw_input else use select . Returns None on timeout and raises EOFError on close
def std_input(self, prompt="", timeout=None):
        """Override for a different input source.
        If not timeout and sys.stdin, use raw_input, else use select.
        Returns None on timeout and raises EOFError on close
        """
        if Set_params["auto_lock"] and not timeout:
            timeout = Set_params["auto_lock"]

        if not timeout and self._stdin is sys.stdin:
            try:
                input_data = raw_input(prompt)
            except ValueError:
                raise EOFError
            self.last_input_time = time.time()
            return input_data

        if prompt:
            self._stdout.write(prompt)
            self._stdout.flush()

        # Note: using select messes up the prompt!
        read_list, _, _ = select.select([self._stdin], [], [], timeout)
        if read_list:
            self.last_input_time = time.time()
            return self._stdin.readline()
        elif Set_params ["password"] and Set_params["auto_lock"] and (time.time() - self.last_input_time) > Set_params["auto_lock"]:
            # Trigger auto lock
            return "lock\n"
        else:
            return None
def std_input ( self , prompt = "" , timeout = None ) : if Set_params [ "auto_lock" ] and not timeout : timeout = Set_params [ "auto_lock" ] if not timeout and self . _stdin is sys . stdin : try : input_data = raw_input ( prompt ) except ValueError : raise EOFError self . last_input_time = time . time ( ) return input_data if prompt : self . _stdout . write ( prompt ) self . _stdout . flush ( ) # Note: using select messes up the prompt! read_list , _ , _ = select . select ( [ self . _stdin ] , [ ] , [ ] , timeout ) if read_list : self . last_input_time = time . time ( ) return self . _stdin . readline ( ) elif Set_params [ "password" ] and Set_params [ "auto_lock" ] and ( time . time ( ) - self . last_input_time ) > Set_params [ "auto_lock" ] : # Trigger auto lock return "lock\n" else : return None