mirror of
				https://github.com/shizand/statapp.git
				synced 2025-10-31 04:02:40 +03:00 
			
		
		
		
	
		
			
				
	
	
		
			12 lines
		
	
	
		
			300 B
		
	
	
	
		
			Python
		
	
	
	
	
	
			
		
		
	
	
			12 lines
		
	
	
		
			300 B
		
	
	
	
		
			Python
		
	
	
	
	
	
| import os
 | |
| import sys
 | |
| 
 | |
| 
 | |
| def resource_path(relative):
 | |
|     if getattr(sys, 'frozen', False):
 | |
|         bundle_dir = sys._MEIPASS
 | |
|     else:
 | |
|         # we are running in a normal Python environment
 | |
|         bundle_dir = os.path.dirname(os.path.abspath(__file__))
 | |
|     return os.path.join(bundle_dir, relative)
 |