2014-05-22 08:43:36 -07:00
|
|
|
#!/usr/bin/env python2
|
2015-03-04 13:42:07 -08:00
|
|
|
# -*- coding: utf-8 -*-
|
2014-03-01 09:12:37 -08:00
|
|
|
|
2014-12-21 12:54:45 -08:00
|
|
|
"""Youtubedlg __main__ file.
|
|
|
|
|
|
|
|
__main__ file is a python 'executable' file which calls the youtubedlg
|
2015-01-10 07:36:27 -08:00
|
|
|
main() function in order to start the app. It can be used to start
|
|
|
|
the app from the package directory OR it can be used to start the app
|
|
|
|
from a different directory after you have installed the youtube_dl_gui
|
|
|
|
package.
|
2014-12-21 12:54:45 -08:00
|
|
|
|
|
|
|
Example:
|
2015-01-10 07:36:27 -08:00
|
|
|
In order to run the app from the package directory.
|
2015-01-10 08:34:22 -08:00
|
|
|
|
2014-12-21 12:54:45 -08:00
|
|
|
$ cd <package director>
|
|
|
|
$ python __main__.py
|
2015-01-10 08:34:22 -08:00
|
|
|
|
2015-01-10 07:36:27 -08:00
|
|
|
In order to run the app from /usr/local/bin etc.. AFTER
|
|
|
|
you have installed the package using setup.py.
|
2015-01-10 08:34:22 -08:00
|
|
|
|
2015-01-10 07:36:27 -08:00
|
|
|
$ youtube-dl-gui
|
2014-12-21 12:54:45 -08:00
|
|
|
|
|
|
|
"""
|
2014-07-20 08:47:07 -07:00
|
|
|
|
2015-03-04 13:42:07 -08:00
|
|
|
from __future__ import unicode_literals
|
|
|
|
|
2014-03-01 09:12:37 -08:00
|
|
|
import sys
|
|
|
|
|
|
|
|
if __package__ is None and not hasattr(sys, "frozen"):
|
|
|
|
# direct call of __main__.py
|
|
|
|
import os.path
|
2014-07-20 08:47:07 -07:00
|
|
|
PATH = os.path.realpath(os.path.abspath(__file__))
|
|
|
|
sys.path.append(os.path.dirname(os.path.dirname(PATH)))
|
2014-03-01 09:12:37 -08:00
|
|
|
|
|
|
|
import youtube_dl_gui
|
|
|
|
|
2014-12-08 09:18:25 -08:00
|
|
|
|
2014-03-01 09:12:37 -08:00
|
|
|
if __name__ == '__main__':
|
2014-03-27 04:41:39 -07:00
|
|
|
youtube_dl_gui.main()
|