# HG changeset patch
# User Jeroen Demeyer <jdemeyer@cage.ugent.be>
# Date 1360166933 3600
# Node ID e46d771d40341afca32d112add3535034ef938c6
# Parent c4316fb58996251555600d40ae9b577b4012690a
Start IPython shell with empty argv
diff git a/sage/misc/interpreter.py b/sage/misc/interpreter.py
a

b


598  598  sage: from sage.misc.interpreter import get_test_shell 
599  599  sage: shell = get_test_shell(); shell 
600  600  <sage.misc.interpreter.SageInteractiveShell object at 0x...> 
 601  
 602  TESTS: 
 603  
 604  Check that :trac:`14070` has been resolved:: 
 605  
 606  sage: from sage.tests.cmdline import test_executable 
 607  sage: cmd = 'from sage.misc.interpreter import get_test_shell; shell = get_test_shell()' 
 608  sage: (out, err, ret) = test_executable(["sage", "c", cmd]) 
 609  sage: out + err 
 610  '' 
601  611  """ 
602  612  app = SageTerminalApp.instance(config=DEFAULT_SAGE_CONFIG) 
603  613  if app.shell is None: 
604   app.initialize() 
 614  app.initialize(argv=[]) 
605  615  return app.shell 
606  616  
607  617  
… 
… 

683  693  
684  694  sage: from sage.misc.interpreter import SageTerminalApp, DEFAULT_SAGE_CONFIG 
685  695  sage: app = SageTerminalApp(config=DEFAULT_SAGE_CONFIG) 
686   sage: app.initialize() #indirect doctest 
 696  sage: app.initialize(argv=[]) # indirect doctest 
687  697  sage: app.shell 
688  698  <sage.misc.interpreter.SageInteractiveShell object at 0x...> 
689  699  """ 