(self)
return launch_params
Dict of launch parameters.
Dict of launch parameters.
Dict of launch parameters .
def launch_params(self):
        """Dict of launch parameters."""
        # build list of commands to execute on session startup
        commands = []
        greeting = False
        if not self.get('resume'):
            run = (
                # positional argument and --load or -l not specified (empty is specified)
                (self.get(0) and self.get('load', get_default=False) is None)
                # or run specified explicitly
                or self.get('run')
            )
            # treat colons as CRs
            commands = split_quoted(self.get('exec'), split_by=u':', quote=u'"', strip_quotes=False)
            # note that executing commands (or RUN) will suppress greeting
            # following GW, don't write greeting for redirected input or command-line filter run
            greeting = not run and not commands and not self.session_params['input_streams']
            if run:
                commands.append('RUN')
            if self.get('quit'):
                commands.append('SYSTEM')
        launch_params = {
            'prog': self.get('run') or self.get('load') or self.get(0),
            'resume': self.get('resume'),
            'greeting': greeting,
            'state_file': self._get_state_file(),
            'commands': commands,
            # inserted keystrokes
            # we first need to encode the unicode to bytes before we can decode it
            # this preserves unicode as \x (if latin-1) and \u escapes
            'keys': self.get('keys').encode('ascii', 'backslashreplace').decode('unicode-escape'),
            'debug': self.get('debug'),
            }
        launch_params.update(self.session_params)
        return launch_params
def launch_params ( self ) : # build list of commands to execute on session startup commands = [ ] greeting = False if not self . get ( 'resume' ) : run = ( # positional argument and --load or -l not specified (empty is specified) ( self . get ( 0 ) and self . get ( 'load' , get_default = False ) is None ) # or run specified explicitly or self . get ( 'run' ) ) # treat colons as CRs commands = split_quoted ( self . get ( 'exec' ) , split_by = u':' , quote = u'"' , strip_quotes = False ) # note that executing commands (or RUN) will suppress greeting # following GW, don't write greeting for redirected input or command-line filter run greeting = not run and not commands and not self . session_params [ 'input_streams' ] if run : commands . append ( 'RUN' ) if self . get ( 'quit' ) : commands . append ( 'SYSTEM' ) launch_params = { 'prog' : self . get ( 'run' ) or self . get ( 'load' ) or self . get ( 0 ) , 'resume' : self . get ( 'resume' ) , 'greeting' : greeting , 'state_file' : self . _get_state_file ( ) , 'commands' : commands , # inserted keystrokes # we first need to encode the unicode to bytes before we can decode it # this preserves unicode as \x (if latin-1) and \u escapes 'keys' : self . get ( 'keys' ) . encode ( 'ascii' , 'backslashreplace' ) . decode ( 'unicode-escape' ) , 'debug' : self . get ( 'debug' ) , } launch_params . update ( self . session_params ) return launch_params