Advertisement
Guest User

D3Edit.py

a guest
Apr 3rd, 2020
220
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.79 KB | None | 0 0
  1. #!/usr/bin/env python3
  2.  
  3. import platform
  4. from os import getcwd
  5.  
  6.  
  7. def main():
  8.     import gui
  9.     # Initialize GUI
  10.     instanced_gui = gui.D3Edit()
  11.     instanced_gui.start()
  12.  
  13.  
  14. if __name__ == "__main__":
  15.     venv_platforms = ['Linux', 'Darwin']
  16.     running_os = platform.system()
  17.     # activate Linux/Darwin venvs:
  18.     if any(p in running_os for p in venv_platforms):
  19.         print("activated linux venv")
  20.         activate_this_file = "{}/venv/bin/activate_this.py".format(getcwd())
  21.         exec(open(activate_this_file).read(), dict(__file__=activate_this_file))
  22.     elif running_os == 'Windows':
  23.         print("Activating Windows venv")
  24.         activate_this_file = "{}\\winvenv\\Scripts\\activate_this.py".format(getcwd())
  25.         exec(open(activate_this_file).read(), dict(__file__=activate_this_file))
  26.     main()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement