mirror of
				https://github.com/python/cpython.git
				synced 2025-10-31 02:15:10 +00:00 
			
		
		
		
	 58a993957a
			
		
	
	
		58a993957a
		
			
		
	
	
	
	
		
			
			Moreover, Py_FrozenMain() relies on Py_InitializeFromConfig() to handle the PYTHONUNBUFFERED environment variable and configure C stdio streams like stdout (make the stream unbuffered).
		
			
				
	
	
		
			17 lines
		
	
	
	
		
			444 B
		
	
	
	
		
			Python
		
	
	
	
	
	
			
		
		
	
	
			17 lines
		
	
	
	
		
			444 B
		
	
	
	
		
			Python
		
	
	
	
	
	
| # Script used to test Py_FrozenMain(): see test_embed.test_frozenmain().
 | |
| # Run "make regen-test-frozenmain" if you modify this test.
 | |
| 
 | |
| import sys
 | |
| import _testinternalcapi
 | |
| 
 | |
| print("Frozen Hello World")
 | |
| print("sys.argv", sys.argv)
 | |
| config = _testinternalcapi.get_configs()['config']
 | |
| for key in (
 | |
|     'program_name',
 | |
|     'executable',
 | |
|     'use_environment',
 | |
|     'configure_c_stdio',
 | |
|     'buffered_stdio',
 | |
| ):
 | |
|     print(f"config {key}: {config[key]}")
 |