mirror of
				https://github.com/python/cpython.git
				synced 2025-10-31 05:31:20 +00:00 
			
		
		
		
	[3.13] gh-121790: Fix interactive console initialization (GH-121793) (GH-121822)
(cherry picked from commit e5c7216f37)
Co-authored-by: Milan Oberkirch <milan.oberkirch@geops.com>
Co-authored-by: Łukasz Langa <lukasz@langa.pl>
			
			
This commit is contained in:
		
							parent
							
								
									0794220a69
								
							
						
					
					
						commit
						5b718e7fc7
					
				
					 6 changed files with 85 additions and 42 deletions
				
			
		|  | @ -23,7 +23,7 @@ | |||
| 
 | ||||
| def interactive_console(mainmodule=None, quiet=False, pythonstartup=False): | ||||
|     if not CAN_USE_PYREPL: | ||||
|         if not os.environ.get('PYTHON_BASIC_REPL', None) and FAIL_REASON: | ||||
|         if not os.getenv('PYTHON_BASIC_REPL') and FAIL_REASON: | ||||
|             from .trace import trace | ||||
|             trace(FAIL_REASON) | ||||
|             print(FAIL_REASON, file=sys.stderr) | ||||
|  | @ -51,5 +51,7 @@ def interactive_console(mainmodule=None, quiet=False, pythonstartup=False): | |||
|     if not hasattr(sys, "ps2"): | ||||
|         sys.ps2 = "... " | ||||
| 
 | ||||
|     from .console import InteractiveColoredConsole | ||||
|     from .simple_interact import run_multiline_interactive_console | ||||
|     run_multiline_interactive_console(namespace) | ||||
|     console = InteractiveColoredConsole(namespace, filename="<stdin>") | ||||
|     run_multiline_interactive_console(console) | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 Miss Islington (bot)
						Miss Islington (bot)