dax/dax_tools_utils.py
def _prompt(self, section, option):
        """Method to prompt a user for an input for the option in the template.

        :param option: option name
        :return: String of the input
        """
        if option in list(OPTIONS_DESCRIPTION.keys()):
            if 'confidential' in list(OPTIONS_DESCRIPTION[option].keys()):
                msg = OPTIONS_DESCRIPTION[option]['msg']
                stdin = getpass.getpass(prompt=msg)
            else:
                stdin = input(OPTIONS_DESCRIPTION[option]['msg'])
            if OPTIONS_DESCRIPTION[option]['is_path'] and stdin:
                if stdin.startswith('~/'):
                    stdin = os.path.join(os.path.expanduser('~'), stdin[2:])
                else:
                    stdin = os.path.abspath(stdin)
                if not os.path.exists(stdin):
                    print("Path <%s> does not exists." % stdin)
                    stdin = self._prompt(section, option)
        else:
            stdin = input('Please enter %s: ' % option)
        if not stdin:
            stdin = DEFAULTS[section][option]

        return stdin
Method to prompt a user for an input for the option in the template.

        :param option: option name
        :return: String of the input
        
Method to prompt a user for an input for the option in the template.
Method to prompt a user for an input for the option in the template .
def _prompt(self, section, option):
        if option in list(OPTIONS_DESCRIPTION.keys()):
            if 'confidential' in list(OPTIONS_DESCRIPTION[option].keys()):
                msg = OPTIONS_DESCRIPTION[option]['msg']
                stdin = getpass.getpass(prompt=msg)
            else:
                stdin = input(OPTIONS_DESCRIPTION[option]['msg'])
            if OPTIONS_DESCRIPTION[option]['is_path'] and stdin:
                if stdin.startswith('~/'):
                    stdin = os.path.join(os.path.expanduser('~'), stdin[2:])
                else:
                    stdin = os.path.abspath(stdin)
                if not os.path.exists(stdin):
                    print("Path <%s> does not exists." % stdin)
                    stdin = self._prompt(section, option)
        else:
            stdin = input('Please enter %s: ' % option)
        if not stdin:
            stdin = DEFAULTS[section][option]
        return stdin
def _prompt ( self , section , option ) : if option in list ( OPTIONS_DESCRIPTION . keys ( ) ) : if 'confidential' in list ( OPTIONS_DESCRIPTION [ option ] . keys ( ) ) : msg = OPTIONS_DESCRIPTION [ option ] [ 'msg' ] stdin = getpass . getpass ( prompt = msg ) else : stdin = input ( OPTIONS_DESCRIPTION [ option ] [ 'msg' ] ) if OPTIONS_DESCRIPTION [ option ] [ 'is_path' ] and stdin : if stdin . startswith ( '~/' ) : stdin = os . path . join ( os . path . expanduser ( '~' ) , stdin [ 2 : ] ) else : stdin = os . path . abspath ( stdin ) if not os . path . exists ( stdin ) : print ( "Path <%s> does not exists." % stdin ) stdin = self . _prompt ( section , option ) else : stdin = input ( 'Please enter %s: ' % option ) if not stdin : stdin = DEFAULTS [ section ] [ option ] return stdin
Method to prompt a user for an input for the option in the template.
Method to prompt a user for an input for the option in the template .
"""Method to prompt a user for an input for the option in the template.

        :param option: option name
        :return: String of the input
        """
String of the input
String of the input
self
section
option
None