mirror of
				https://github.com/python/cpython.git
				synced 2025-10-29 20:51:26 +00:00 
			
		
		
		
	
		
			
				
	
	
		
			14 lines
		
	
	
	
		
			235 B
		
	
	
	
		
			Python
		
	
	
	
	
	
			
		
		
	
	
			14 lines
		
	
	
	
		
			235 B
		
	
	
	
		
			Python
		
	
	
	
	
	
| # Module 'anywin'
 | |
| # Open a file or directory in a window
 | |
| 
 | |
| import dirwin
 | |
| import filewin
 | |
| import os
 | |
| 
 | |
| def open(name):
 | |
| 	print 'opening', name, '...'
 | |
| 	if os.path.isdir(name):
 | |
| 		w = dirwin.open(name)
 | |
| 	else:
 | |
| 		w = filewin.open(name)
 | |
| 	return w
 | 
