def useTest(vm, prompt=Prompt):
 old = vm.logfile
 if (old == stdout):
  log('* Temporarily disabling logging to stdout')
  vm.logfile = None
 log('* Switching to interactive use - press control-] to exit')
 vm.interact()
 if (old == stdout):
  log('* Restoring logging to stdout')
  vm.logfile = stdout

def useTest ( vm , prompt = Prompt ) : old = vm . logfile if ( old == stdout ) : log ( '* Temporarily disabling logging to stdout' ) vm . logfile = None log ( '* Switching to interactive use - press control-] to exit' ) vm . interact ( ) if ( old == stdout ) : log ( '* Restoring logging to stdout' ) vm . logfile = stdout
use vm interactively - exit by pressing control-] .