mirror of
				https://github.com/python/cpython.git
				synced 2025-10-31 13:41:24 +00:00 
			
		
		
		
	If $TERM is "dumb" or "emacs", just dump the text instead of trying to run
"less". Patch contributed by Alex Convertry. This closes SF patch #443551.
This commit is contained in:
		
							parent
							
								
									6fd3b22847
								
							
						
					
					
						commit
						0a66fcb116
					
				
					 1 changed files with 2 additions and 0 deletions
				
			
		|  | @ -954,6 +954,8 @@ def getpager(): | |||
|         return plainpager | ||||
|     if not sys.stdin.isatty() or not sys.stdout.isatty(): | ||||
|         return plainpager | ||||
|     if os.environ.get('TERM') in ['dumb', 'emacs']: | ||||
|         return lambda text: sys.stdout.write(text) | ||||
|     if os.environ.has_key('PAGER'): | ||||
|         if sys.platform == 'win32': # pipes completely broken in Windows | ||||
|             return lambda text: tempfilepager(plain(text), os.environ['PAGER']) | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 Fred Drake
						Fred Drake