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.

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