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
917 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
  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 for starting
  5. the app from inside the package OR it can be used for starting the app
  6. from a different directory after you have installed the
  7. youtube_dl_gui package.
  8. Example:
  9. In order to run the app from inside the package.
  10. $ cd <package director>
  11. $ python __main__.py
  12. In order to run the app from /usr/local/bin AFTER
  13. you have installed the package.
  14. $ youtube-dlg
  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()