Guest User

Untitled

a guest
Jun 18th, 2018
69
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.29 KB | None | 0 0
  1. def resource_path(relative_path):
  2. """ Get absolute path to resource, works for dev and for PyInstaller """
  3. base_path = getattr(sys, '_MEIPASS', os.path.dirname(os.path.abspath(__file__)))
  4. return os.path.join(base_path, relative_path)
  5.  
  6. os.popen(resource_path('sometool.exe'))
Add Comment
Please, Sign In to add comment