Python six.moves.input() Examples

The following are 30 code examples of six.moves.input(). You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may also want to check out all available functions/classes of the module six.moves , or try the search function .
Example #1
Source File: utils.py    From loaner with Apache License 2.0 6 votes vote down vote up
def prompt_enum(message, accepted_values=None, case_sensitive=True, **kwargs):
  """Prompts the user for a value within an Enum.

  Args:
    message: str, the info message to display before prompting for user input.
    accepted_values: List[Any], a list of accepted values.
    case_sensitive: bool, whether or not validation should require the response
        to be the same case.
    **kwargs: keyword arguments to be passed to prompt.

  Returns:
    A user provided value from within the Enum.
  """
  message += '\nAvailable options are: {}'.format(', '.join(accepted_values))
  parser = flags.EnumParser(
      enum_values=accepted_values, case_sensitive=case_sensitive)
  return prompt(message, parser=parser, **kwargs) 
Example #2
Source File: interactive_labeler.py    From libact with BSD 2-Clause "Simplified" License 6 votes vote down vote up
def label(self, feature):
        plt.imshow(feature, cmap=plt.cm.gray_r, interpolation='nearest')
        plt.draw()

        banner = "Enter the associated label with the image: "

        if self.label_name is not None:
            banner += str(self.label_name) + ' '

        lbl = input(banner)

        while (self.label_name is not None) and (lbl not in self.label_name):
            print('Invalid label, please re-enter the associated label.')
            lbl = input(banner)

        return self.label_name.index(lbl) 
Example #3
Source File: voicebox.py    From pt-voicebox with MIT License 6 votes vote down vote up
def load_voices_from_transcript(self):
        transcripts = os.listdir('texts/transcripts')
        for i in range(len(transcripts)):
            print("%s %s" % (i + 1, transcripts[i]))
        choice = input('Enter the number of the transcript you want to load:\n')
        transcript_name = transcripts[int(choice) - 1]
        number = int(input('Enter the number of voices to load:\n'))
        for charname, size in self.biggest_characters(transcript_name, number):
            print(charname)
            path = 'texts/transcripts/%s/%s' % (transcript_name, charname)
            source_text = open(path).read()
            corpus_name = charname
            weighted_corpora = {}
            weighted_corpora[charname] = [Corpus(source_text, corpus_name), 1]
            self.voices[charname] = Voice(weighted_corpora, charname)

    # retrieves a list of the top 20 largest character text files in a transcript folder 
Example #4
Source File: voicebox.py    From pt-voicebox with MIT License 6 votes vote down vote up
def add_voice(self):
        new_voice = Voice({})     # creates new voice with no name and empty tree of corpora
        texts = os.listdir('texts')
        add_another_corpus = ''
        while add_another_corpus != 'n':
            for i in range(len(texts)):
                print("%s %s" % (i + 1, texts[i]))
            choice = input('Enter the number of the corpus you want to load:\n')
            corpus_name = texts[int(choice) - 1]
            path = 'texts/%s' % corpus_name
            f = open(path, 'r')
            text = f.read()
            corpus_weight_prompt = 'Enter the weight for %s:\n' % corpus_name
            corpus_weight = float(input(corpus_weight_prompt))
            new_voice.add_corpus(Corpus(text, corpus_name), corpus_weight)
            texts.remove(corpus_name)
            add_another_corpus = input('Add another corpus to this voice? y/n\n')
        voicename = input('Name this voice:\n')
        new_voice.name = voicename
        new_voice.normalize_weights()
        self.voices[voicename] = new_voice

    # asks user to specify a transcript and number of characters, and makes separate voices for that number of
    # the most represented characters in the transcript 
Example #5
Source File: utils.py    From loaner with Apache License 2.0 6 votes vote down vote up
def parse(self, arg):
    """Parses and validates the provided argument.

    Args:
      arg: str, the string to be parsed and validated.

    Returns:
      A boolean for whether or not the provided input is valid.

    Raises:
      ValueError: when the provided argument is invalid.
    """
    if isinstance(arg, bool):
      return arg
    clean_arg = arg.strip().lower()
    if clean_arg in self._valid_yes:
      return True
    if clean_arg in self._valid_no:
      return False
    raise ValueError("the value {!r} is not a 'yes' or 'no'".format(arg)) 
Example #6
Source File: device_model.py    From glazier with Apache License 2.0 6 votes vote down vote up
def _ModelSupportPrompt(self, message: Text, this_model: Text) -> bool:
    """Prompts the user whether to halt an unsupported build.

    Args:
      message: A message to be displayed to the user.
      this_model: The hardware model that failed validation.

    Returns:
      true if the user wishes to proceed anyway, else false.
    """
    warning = message % this_model
    print(warning)
    answer = input('Do you still want to proceed (y/n)? ')
    answer_re = r'^[Yy](es)?$'
    if re.match(answer_re, answer):
      return True
    return False 
Example #7
Source File: chute.py    From Paradrop with Apache License 2.0 6 votes vote down vote up
def get_base_name():
    print("")
    print("Base Image Name")
    print("")
    print("Enter the name of the base image to use. This depends on the")
    print("programming language that you intend to use.")
    print("")
    print("Valid choices: " + ", ".join(SUPPORTED_BASE_IMAGES))
    while True:
        name = input("image [python2]: ").lower()
        if len(name) == 0:
            name = "python2"

        if name not in SUPPORTED_BASE_IMAGES:
            print("Valid choices: " + ", ".join(SUPPORTED_BASE_IMAGES))
            continue

        return name 
Example #8
Source File: chute.py    From Paradrop with Apache License 2.0 6 votes vote down vote up
def get_chute_type():
    print("")
    print("Chute Type")
    print("")
    print("Paradrop has two types of chutes. Light chutes are based on a base")
    print("image that is optimized for a particular language such as Python or")
    print("JavaScript and use the language-specific package manager (pip or npm)")
    print("to install dependencies. Normal chutes give you more flexibility to")
    print("install dependencies but require that you write your own Dockerfile.")
    print("")
    print("Valid types: light, normal")
    valid = set(["light", "normal"])
    while True:
        ctype = input("type [normal]: ").lower()
        if len(ctype) == 0:
            ctype = "normal"

        if ctype not in valid:
            print("Valid types: light, normal")
            continue

        return ctype 
Example #9
Source File: chute.py    From Paradrop with Apache License 2.0 6 votes vote down vote up
def get_name():
    print("")
    print("Chute Name")
    print("")
    print("This name will be used on the router status page and chute store.")
    print("Please use only lowercase letters, numbers, and hypens.")
    print("")

    # Guess the project name based on the directory we are in.
    default_name = os.path.basename(os.getcwd())

    while True:
        name = input("name [{}]: ".format(default_name))
        if len(name) == 0:
            name = default_name

        match = re.match("[a-z][a-z0-9\-]*", name)
        if match is None:
            print("The name does not meet Paradrop's requirements for chute names.")
            print("Please use only lowercase letters, numbers, and hypens.")
            continue

        return name 
Example #10
Source File: voicebox.py    From pt-voicebox with MIT License 6 votes vote down vote up
def __init__(self):
        self.more_info = False
        self.dynamic = False
        self.mode_list = ['frequency', 'sigscore', 'count']
        self.mode = 'frequency'
        # self.spanish_to_english = False
        self.num_options = 20

        load_prev = input('Load previous session? y/n\n')
        if load_prev != 'n':
            loaded_voicebox = self.load_session()               # unpickles a previously-saved object
            self.cursor = loaded_voicebox.cursor
            self.cursor_position = loaded_voicebox.cursor_position
            self.voices = loaded_voicebox.voices
            self.active_voice = loaded_voicebox.active_voice
            self.log = loaded_voicebox.log
        else:
            self.cursor = "|"
            self.cursor_position = 0
            self.voices = {}
            self.load_voices()
            self.active_voice = self.choose_voice()
            self.log = [] 
Example #11
Source File: validator.py    From ovirt-ansible-disaster-recovery with Apache License 2.0 5 votes vote down vote up
def _set_dr_conf_variables(self, conf_file):
        _SECTION = 'validate_vars'
        _VAR_FILE = 'var_file'

        # Get default location of the yml var file.
        settings = SafeConfigParser()
        settings.read(conf_file)
        if _SECTION not in settings.sections():
            settings.add_section(_SECTION)
        if not settings.has_option(_SECTION, _VAR_FILE):
            settings.set(_SECTION, _VAR_FILE, '')
        var_file = settings.get(_SECTION, _VAR_FILE,
                                vars=DefaultOption(settings,
                                                   _SECTION,
                                                   site=self.def_var_file))

        # If no default location exists, get the location from the user.
        while not var_file:
            var_file = input("%s%sVar file is not initialized. "
                             "Please provide the location of the var file "
                             "(%s):%s " % (WARN,
                                           PREFIX,
                                           self.def_var_file,
                                           END) or self.def_var_file)

        self.var_file = var_file 
Example #12
Source File: generate_vars.py    From ovirt-ansible-disaster-recovery with Apache License 2.0 5 votes vote down vote up
def _validate_output_file_exists(self, fname, log):
        _dir = os.path.dirname(fname)
        if _dir != '' and not os.path.exists(_dir):
            log.warn("Path '%s' does not exists. Create folder",
                     _dir)
            os.makedirs(_dir)
        if os.path.isfile(fname):
            valid = {"yes": True, "y": True, "ye": True,
                     "no": False, "n": False}
            ans = input("%s%sThe output file '%s' "
                        "already exists. "
                        "Would you like to override it (y,n)?%s "
                        % (WARN, PREFIX, fname, END))
            while True:
                ans = ans.lower()
                if ans in valid:
                    if not valid[ans]:
                        msg = "Failed to create output file. " \
                              "File could not be overriden."
                        log.error(msg)
                        print("%s%s%s%s" % (FAIL, PREFIX, msg, END))
                        sys.exit(0)
                    break
                else:
                    ans = input("%s%sPlease respond with 'yes' or 'no': %s"
                                % (INPUT, PREFIX, END))
            try:
                os.remove(fname)
            except OSError:
                log.error("File %s could not be replaced.", fname)
                print("%s%sFile %s could not be replaced.%s"
                      % (FAIL,
                         PREFIX,
                         fname,
                         END))
                sys.exit(0) 
Example #13
Source File: validator.py    From ovirt-ansible-disaster-recovery with Apache License 2.0 5 votes vote down vote up
def _set_dr_conf_variables(self, conf_file):
        _SECTION = 'validate_vars'
        _VAR_FILE = 'var_file'

        # Get default location of the yml var file.
        settings = SafeConfigParser()
        settings.read(conf_file)
        if _SECTION not in settings.sections():
            settings.add_section(_SECTION)
        if not settings.has_option(_SECTION, _VAR_FILE):
            settings.set(_SECTION, _VAR_FILE, '')
        var_file = settings.get(_SECTION, _VAR_FILE,
                                vars=DefaultOption(settings,
                                                   _SECTION,
                                                   site=self.def_var_file))

        # If no default location exists, get the location from the user.
        while not var_file:
            var_file = input("%s%sVar file is not initialized. "
                             "Please provide the location of the var file "
                             "(%s):%s " % (WARN,
                                           PREFIX,
                                           self.def_var_file,
                                           END) or self.def_var_file)

        self.var_file = var_file 
Example #14
Source File: validator.py    From ovirt-ansible-disaster-recovery with Apache License 2.0 5 votes vote down vote up
def _set_dr_conf_variables(self, conf_file):
        _SECTION = 'validate_vars'
        _VAR_FILE = 'var_file'

        # Get default location of the yml var file.
        settings = SafeConfigParser()
        settings.read(conf_file)
        if _SECTION not in settings.sections():
            settings.add_section(_SECTION)
        if not settings.has_option(_SECTION, _VAR_FILE):
            settings.set(_SECTION, _VAR_FILE, '')
        var_file = settings.get(_SECTION, _VAR_FILE,
                                vars=DefaultOption(settings,
                                                   _SECTION,
                                                   site=self.def_var_file))

        # If no default location exists, get the location from the user.
        while not var_file:
            var_file = input("%s%sVar file is not initialized. "
                             "Please provide the location of the var file "
                             "(%s):%s " % (WARN,
                                           PREFIX,
                                           self.def_var_file,
                                           END) or self.def_var_file)

        self.var_file = var_file 
Example #15
Source File: generate_vars.py    From ovirt-ansible-disaster-recovery with Apache License 2.0 5 votes vote down vote up
def _validate_output_file_exists(self, fname, log):
        _dir = os.path.dirname(fname)
        if _dir != '' and not os.path.exists(_dir):
            log.warn("Path '%s' does not exists. Create folder",
                     _dir)
            os.makedirs(_dir)
        if os.path.isfile(fname):
            valid = {"yes": True, "y": True, "ye": True,
                     "no": False, "n": False}
            ans = input("%s%sThe output file '%s' "
                        "already exists. "
                        "Would you like to override it (y,n)?%s "
                        % (WARN, PREFIX, fname, END))
            while True:
                ans = ans.lower()
                if ans in valid:
                    if not valid[ans]:
                        msg = "Failed to create output file. " \
                              "File could not be overriden."
                        log.error(msg)
                        print("%s%s%s%s" % (FAIL, PREFIX, msg, END))
                        sys.exit(0)
                    break
                else:
                    ans = input("%s%sPlease respond with 'yes' or 'no': %s"
                                % (INPUT, PREFIX, END))
            try:
                os.remove(fname)
            except OSError:
                log.error("File %s could not be replaced.", fname)
                print("%s%sFile %s could not be replaced.%s"
                      % (FAIL,
                         PREFIX,
                         fname,
                         END))
                sys.exit(0) 
Example #16
Source File: validator.py    From ovirt-ansible-disaster-recovery with Apache License 2.0 5 votes vote down vote up
def _set_dr_conf_variables(self, conf_file):
        _SECTION = 'validate_vars'
        _VAR_FILE = 'var_file'

        # Get default location of the yml var file.
        settings = SafeConfigParser()
        settings.read(conf_file)
        if _SECTION not in settings.sections():
            settings.add_section(_SECTION)
        if not settings.has_option(_SECTION, _VAR_FILE):
            settings.set(_SECTION, _VAR_FILE, '')
        var_file = settings.get(_SECTION, _VAR_FILE,
                                vars=DefaultOption(settings,
                                                   _SECTION,
                                                   site=self.def_var_file))

        # If no default location exists, get the location from the user.
        while not var_file:
            var_file = input("%s%sVar file is not initialized. "
                             "Please provide the location of the var file "
                             "(%s):%s " % (WARN,
                                           PREFIX,
                                           self.def_var_file,
                                           END) or self.def_var_file)

        self.var_file = var_file 
Example #17
Source File: validator.py    From ovirt-ansible-disaster-recovery with Apache License 2.0 5 votes vote down vote up
def _set_dr_conf_variables(self, conf_file):
        _SECTION = 'validate_vars'
        _VAR_FILE = 'var_file'

        # Get default location of the yml var file.
        settings = SafeConfigParser()
        settings.read(conf_file)
        if _SECTION not in settings.sections():
            settings.add_section(_SECTION)
        if not settings.has_option(_SECTION, _VAR_FILE):
            settings.set(_SECTION, _VAR_FILE, '')
        var_file = settings.get(_SECTION, _VAR_FILE,
                                vars=DefaultOption(settings,
                                                   _SECTION,
                                                   site=self.def_var_file))

        # If no default location exists, get the location from the user.
        while not var_file:
            var_file = input("%s%sVar file is not initialized. "
                             "Please provide the location of the var file "
                             "(%s):%s " % (WARN,
                                           PREFIX,
                                           self.def_var_file,
                                           END) or self.def_var_file)

        self.var_file = var_file 
Example #18
Source File: generate_vars.py    From ovirt-ansible-disaster-recovery with Apache License 2.0 5 votes vote down vote up
def _validate_output_file_exists(self, fname, log):
        _dir = os.path.dirname(fname)
        if _dir != '' and not os.path.exists(_dir):
            log.warn("Path '%s' does not exists. Create folder",
                     _dir)
            os.makedirs(_dir)
        if os.path.isfile(fname):
            valid = {"yes": True, "y": True, "ye": True,
                     "no": False, "n": False}
            ans = input("%s%sThe output file '%s' "
                        "already exists. "
                        "Would you like to override it (y,n)?%s "
                        % (WARN, PREFIX, fname, END))
            while True:
                ans = ans.lower()
                if ans in valid:
                    if not valid[ans]:
                        msg = "Failed to create output file. " \
                              "File could not be overriden."
                        log.error(msg)
                        print("%s%s%s%s" % (FAIL, PREFIX, msg, END))
                        sys.exit(0)
                    break
                else:
                    ans = input("%s%sPlease respond with 'yes' or 'no': %s"
                                % (INPUT, PREFIX, END))
            try:
                os.remove(fname)
            except OSError:
                log.error("File %s could not be replaced.", fname)
                print("%s%sFile %s could not be replaced.%s"
                      % (FAIL,
                         PREFIX,
                         fname,
                         END))
                sys.exit(0) 
Example #19
Source File: generate_vars.py    From ovirt-ansible-disaster-recovery with Apache License 2.0 5 votes vote down vote up
def _validate_output_file_exists(self, fname, log):
        _dir = os.path.dirname(fname)
        if _dir != '' and not os.path.exists(_dir):
            log.warn("Path '%s' does not exists. Create folder",
                     _dir)
            os.makedirs(_dir)
        if os.path.isfile(fname):
            valid = {"yes": True, "y": True, "ye": True,
                     "no": False, "n": False}
            ans = input("%s%sThe output file '%s' "
                        "already exists. "
                        "Would you like to override it (y,n)?%s "
                        % (WARN, PREFIX, fname, END))
            while True:
                ans = ans.lower()
                if ans in valid:
                    if not valid[ans]:
                        msg = "Failed to create output file. " \
                              "File could not be overriden."
                        log.error(msg)
                        print("%s%s%s%s" % (FAIL, PREFIX, msg, END))
                        sys.exit(0)
                    break
                else:
                    ans = input("%s%sPlease respond with 'yes' or 'no': %s"
                                % (INPUT, PREFIX, END))
            try:
                os.remove(fname)
            except OSError:
                log.error("File %s could not be replaced.", fname)
                print("%s%sFile %s could not be replaced.%s"
                      % (FAIL,
                         PREFIX,
                         fname,
                         END))
                sys.exit(0) 
Example #20
Source File: validator.py    From ovirt-ansible-disaster-recovery with Apache License 2.0 5 votes vote down vote up
def _set_dr_conf_variables(self, conf_file):
        _SECTION = 'validate_vars'
        _VAR_FILE = 'var_file'

        # Get default location of the yml var file.
        settings = SafeConfigParser()
        settings.read(conf_file)
        if _SECTION not in settings.sections():
            settings.add_section(_SECTION)
        if not settings.has_option(_SECTION, _VAR_FILE):
            settings.set(_SECTION, _VAR_FILE, '')
        var_file = settings.get(_SECTION, _VAR_FILE,
                                vars=DefaultOption(settings,
                                                   _SECTION,
                                                   site=self.def_var_file))

        # If no default location exists, get the location from the user.
        while not var_file:
            var_file = input("%s%sVar file is not initialized. "
                             "Please provide the location of the var file "
                             "(%s):%s " % (WARN,
                                           PREFIX,
                                           self.def_var_file,
                                           END) or self.def_var_file)

        self.var_file = var_file 
Example #21
Source File: generate_vars.py    From ovirt-ansible-disaster-recovery with Apache License 2.0 5 votes vote down vote up
def _validate_output_file_exists(self, fname, log):
        _dir = os.path.dirname(fname)
        if _dir != '' and not os.path.exists(_dir):
            log.warn("Path '%s' does not exists. Create folder",
                     _dir)
            os.makedirs(_dir)
        if os.path.isfile(fname):
            valid = {"yes": True, "y": True, "ye": True,
                     "no": False, "n": False}
            ans = input("%s%sThe output file '%s' "
                        "already exists. "
                        "Would you like to override it (y,n)?%s "
                        % (WARN, PREFIX, fname, END))
            while True:
                ans = ans.lower()
                if ans in valid:
                    if not valid[ans]:
                        msg = "Failed to create output file. " \
                              "File could not be overriden."
                        log.error(msg)
                        print("%s%s%s%s" % (FAIL, PREFIX, msg, END))
                        sys.exit(0)
                    break
                else:
                    ans = input("%s%sPlease respond with 'yes' or 'no': %s"
                                % (INPUT, PREFIX, END))
            try:
                os.remove(fname)
            except OSError:
                log.error("File %s could not be replaced.", fname)
                print("%s%sFile %s could not be replaced.%s"
                      % (FAIL,
                         PREFIX,
                         fname,
                         END))
                sys.exit(0) 
Example #22
Source File: admin.py    From pagure with GNU General Public License v2.0 5 votes vote down vote up
def _ask_confirmation():
    """ Ask to confirm an action.
    """
    action = input("Do you want to continue? [y/N]")
    return action.lower() in ["y", "yes"] 
Example #23
Source File: release.py    From spark-deep-learning with Apache License 2.0 5 votes vote down vote up
def verify(prompt, interactive):
    if not interactive:
        return True
    response = None
    while response not in ("y", "yes", "n", "no"):
        response = input(prompt).lower()
    return response in ("y", "yes") 
Example #24
Source File: prompting.py    From knack with MIT License 5 votes vote down vote up
def prompt_choice_list(msg, a_list, default=1, help_string=None):
    """Prompt user to select from a list of possible choices.

    :param msg:A message displayed to the user before the choice list
    :type msg: str
    :param a_list:The list of choices (list of strings or list of dicts with 'name' & 'desc')
    "type a_list: list
    :param default:The default option that should be chosen if user doesn't enter a choice
    :type default: int
    :returns: The list index of the item chosen.
    """
    verify_is_a_tty()
    options = '\n'.join([' [{}] {}{}'
                         .format(i + 1,
                                 x['name'] if isinstance(x, dict) and 'name' in x else x,
                                 ' - ' + x['desc'] if isinstance(x, dict) and 'desc' in x else '')
                         for i, x in enumerate(a_list)])
    allowed_vals = list(range(1, len(a_list) + 1))
    while True:
        val = _input('{}\n{}\nPlease enter a choice [Default choice({})]: '.format(msg, options, default))
        if val == '?' and help_string is not None:
            print(help_string)
            continue
        if not val:
            val = '{}'.format(default)
        try:
            ans = int(val)
            if ans in allowed_vals:
                # array index is 0-based, user input is 1-based
                return ans - 1
            raise ValueError
        except ValueError:
            logger.warning('Valid values are %s', allowed_vals) 
Example #25
Source File: prompting.py    From knack with MIT License 5 votes vote down vote up
def _input(msg):
    return input(msg) 
Example #26
Source File: voicebox.py    From pt-voicebox with MIT License 5 votes vote down vote up
def choose_voice(self):
        voice_keys = sorted(self.voices.keys())
        print("VOICES:")
        for i in range(len(voice_keys)):
            print("%s: %s" % (i + 1, voice_keys[i]))
        choice = input('Choose a voice by entering a number...\n')
        self.active_voice = self.voices[voice_keys[int(choice) - 1]]
        return self.active_voice 
Example #27
Source File: voicebox.py    From pt-voicebox with MIT License 5 votes vote down vote up
def set_weights(self, v):
        for key in v.weighted_corpora:
            corpus_name = v.weighted_corpora[key][0].name
            corpus_weight_prompt = 'Enter the weight for %s:\n' % corpus_name
            corpus_weight = float(input(corpus_weight_prompt))
            v.weighted_corpora[key][1] = corpus_weight
        v.normalize_weights()

    # random choice without weight bias 
Example #28
Source File: voicebox.py    From pt-voicebox with MIT License 5 votes vote down vote up
def load_session(self):
        sessions = os.listdir('saved')
        for i in range(len(sessions)):
            print("%s %s" % (i + 1, sessions[i]))
        choice = input('Enter the number of the session you want to load:\n')
        session_name = sessions[int(choice) - 1]
        path = 'saved/%s' % session_name
        return loadobject(path)

    # given a chosen word and a tree of scores assigned to it by different sources, updates the weights of those sources
    # according to whether they exceeded or fell short of their expected contribution to the suggestion 
Example #29
Source File: voicebox.py    From pt-voicebox with MIT License 5 votes vote down vote up
def save_session(self):
        path = 'saved/%s.pkl' % input("Choose save name:\n")
        save_object(self, path)
        print("Saved voicebox to %s!" % path)

    # prompts choice of session to load, then loads it. 
Example #30
Source File: voicebox.py    From pt-voicebox with MIT License 5 votes vote down vote up
def set_mode(self):
        for i in range(len(self.mode_list)):
            print("%s %s" % (i + 1, self.mode_list[i]))
        choice = input('Enter the number of the session you want to load:\n')
        self.mode = self.mode_list[int(choice) - 1]

    # saves all information about the current session