def cli_login(self, password='', captcha='', email_code='', twofactor_code='', language='english'):
        """Generates CLI prompts to perform the entire login process

        :param password: password, if it wasn't provided on instance init
        :type  password: :class:`str`
        :param captcha: text reponse for captcha challenge
        :type  captcha: :class:`str`
        :param email_code: email code for steam guard
        :type  email_code: :class:`str`
        :param twofactor_code: 2FA code for steam guard
        :type  twofactor_code: :class:`str`
        :param language: select language for steam web pages (sets language cookie)
        :type  language: :class:`str`
        :return: a session on success and :class:`None` otherwise
        :rtype: :class:`requests.Session`, :class:`None`

        .. code:: python

            In [3]: user.cli_login()
            Enter password for 'steamuser':
            Solve CAPTCHA at https://steamcommunity.com/login/rendercaptcha/?gid=1111111111111111111
            CAPTCHA code: 123456
            Invalid password for 'steamuser'. Enter password:
            Solve CAPTCHA at https://steamcommunity.com/login/rendercaptcha/?gid=2222222222222222222
            CAPTCHA code: abcdef
            Enter 2FA code: AB123
            Out[3]: <requests.sessions.Session at 0x6fffe56bef0>

        """

        # loop until successful login
        while True:
            try:
                return self.login(password, captcha, email_code, twofactor_code, language)
            except (LoginIncorrect, CaptchaRequired) as exp:
                email_code = twofactor_code = ''

                if isinstance(exp, LoginIncorrect):
                    prompt = ("Enter password for %s: " if not password else
                              "Invalid password for %s. Enter password: ")
                    password = getpass(prompt % repr(self.username))
                if isinstance(exp, CaptchaRequired):
                    prompt = "Solve CAPTCHA at %s\nCAPTCHA code: " % self.captcha_url
                    captcha = _cli_input(prompt)
                else:
                    captcha = ''
            except EmailCodeRequired:
                prompt = ("Enter email code: " if not email_code else
                          "Incorrect code. Enter email code: ")
                email_code, twofactor_code = _cli_input(prompt), ''
            except TwoFactorCodeRequired:
                prompt = ("Enter 2FA code: " if not twofactor_code else
                          "Incorrect code. Enter 2FA code: ")
                email_code, twofactor_code = '', _cli_input(prompt)
def cli_login ( self , password = '' , captcha = '' , email_code = '' , twofactor_code = '' , language = 'english' ) : while True : try : return self . login ( password , captcha , email_code , twofactor_code , language ) except ( LoginIncorrect , CaptchaRequired ) as exp : email_code = twofactor_code = '' if isinstance ( exp , LoginIncorrect ) : prompt = ( "Enter password for %s: " if not password else "Invalid password for %s. Enter password: " ) password = getpass ( prompt % repr ( self . username ) ) if isinstance ( exp , CaptchaRequired ) : prompt = "Solve CAPTCHA at %s\nCAPTCHA code: " % self . captcha_url captcha = _cli_input ( prompt ) else : captcha = '' except EmailCodeRequired : prompt = ( "Enter email code: " if not email_code else "Incorrect code. Enter email code: " ) email_code , twofactor_code = _cli_input ( prompt ) , '' except TwoFactorCodeRequired : prompt = ( "Enter 2FA code: " if not twofactor_code else "Incorrect code. Enter 2FA code: " ) email_code , twofactor_code = '' , _cli_input ( prompt )
Generates CLI prompts to perform the entire login process

        :param password: password, if it wasn't provided on instance init
        :type  password: :class:`str`
        :param captcha: text reponse for captcha challenge
        :type  captcha: :class:`str`
        :param email_code: email code for steam guard
        :type  email_code: :class:`str`
        :param twofactor_code: 2FA code for steam guard
        :type  twofactor_code: :class:`str`
        :param language: select language for steam web pages (sets language cookie)
        :type  language: :class:`str`
        :return: a session on success and :class:`None` otherwise
        :rtype: :class:`requests.Session`, :class:`None`

        .. code:: python

            In [3]: user.cli_login()
            Enter password for 'steamuser':
            Solve CAPTCHA at https://steamcommunity.com/login/rendercaptcha/?gid=1111111111111111111
            CAPTCHA code: 123456
            Invalid password for 'steamuser'. Enter password:
            Solve CAPTCHA at https://steamcommunity.com/login/rendercaptcha/?gid=2222222222222222222
            CAPTCHA code: abcdef
            Enter 2FA code: AB123
            Out[3]: <requests.sessions.Session at 0x6fffe56bef0>