You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

36 lines
926 B

10 years ago
10 years ago
10 years ago
10 years ago
10 years ago
10 years ago
10 years ago
10 years ago
10 years ago
10 years ago
10 years ago
  1. #!/usr/bin/env python2
  2. """Youtubedlg __main__ file.
  3. __main__ file is a python 'executable' file which calls the youtubedlg
  4. main() function in order to start the app. It can be used to start
  5. the app from the package directory OR it can be used to start the app
  6. from a different directory after you have installed the youtube_dl_gui
  7. package.
  8. Example:
  9. In order to run the app from the package directory.
  10. $ cd <package director>
  11. $ python __main__.py
  12. In order to run the app from /usr/local/bin etc.. AFTER
  13. you have installed the package using setup.py.
  14. $ youtube-dl-gui
  15. """
  16. import sys
  17. if __package__ is None and not hasattr(sys, "frozen"):
  18. # direct call of __main__.py
  19. import os.path
  20. PATH = os.path.realpath(os.path.abspath(__file__))
  21. sys.path.append(os.path.dirname(os.path.dirname(PATH)))
  22. import youtube_dl_gui
  23. if __name__ == '__main__':
  24. youtube_dl_gui.main()