mirror of
				https://github.com/python/cpython.git
				synced 2025-10-31 13:41:24 +00:00 
			
		
		
		
	Get quit() and exit() to work cleanly when not using subprocess.
This commit is contained in:
		
							parent
							
								
									b1cb56ad17
								
							
						
					
					
						commit
						f137e1df2c
					
				
					 1 changed files with 10 additions and 7 deletions
				
			
		|  | @ -713,14 +713,17 @@ def runcode(self, code): | |||
|                 else: | ||||
|                     exec code in self.locals | ||||
|             except SystemExit: | ||||
|                 if tkMessageBox.askyesno( | ||||
|                     "Exit?", | ||||
|                     "Do you want to exit altogether?", | ||||
|                     default="yes", | ||||
|                     master=self.tkconsole.text): | ||||
|                     raise | ||||
|                 if not self.tkconsole.closing: | ||||
|                     if tkMessageBox.askyesno( | ||||
|                         "Exit?", | ||||
|                         "Do you want to exit altogether?", | ||||
|                         default="yes", | ||||
|                         master=self.tkconsole.text): | ||||
|                         raise | ||||
|                     else: | ||||
|                         self.showtraceback() | ||||
|                 else: | ||||
|                     self.showtraceback() | ||||
|                     raise | ||||
|             except: | ||||
|                 if use_subprocess: | ||||
|                     print >> self.tkconsole.stderr, \ | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 Kurt B. Kaiser
						Kurt B. Kaiser