(
        interface=None, guard=NOGUARD,
        resume=False, debug=False, state_file=None,
        prog=None, commands=(), keys=u'', greeting=True, **session_params
    )
Run an interactive BASIC session.
Run an interactive BASIC session.
Run an interactive BASIC session .
def _run_session(
        interface=None, guard=NOGUARD,
        resume=False, debug=False, state_file=None,
        prog=None, commands=(), keys=u'', greeting=True, **session_params
    ):
    """Run an interactive BASIC session."""
    Session = basic.DebugSession if debug else basic.Session
    with Session(interface, **session_params) as s:
        with state.manage_state(s, state_file, resume) as session:
            with guard.protect(interface, session):
                if greeting:
                    session.greet()
                if prog:
                    with session.bind_file(prog) as progfile:
                        session.execute(b'LOAD "%s"' % (progfile,))
                session.press_keys(keys)
                for cmd in commands:
                    session.execute(cmd)
                session.interact()
def _run_session ( interface = None , guard = NOGUARD , resume = False , debug = False , state_file = None , prog = None , commands = ( ) , keys = u'' , greeting = True , * * session_params ) : Session = basic . DebugSession if debug else basic . Session with Session ( interface , * * session_params ) as s : with state . manage_state ( s , state_file , resume ) as session : with guard . protect ( interface , session ) : if greeting : session . greet ( ) if prog : with session . bind_file ( prog ) as progfile : session . execute ( b'LOAD "%s"' % ( progfile , ) ) session . press_keys ( keys ) for cmd in commands : session . execute ( cmd ) session . interact ( )