X-Git-Url: http://git.bitcoin.ninja/index.cgi?a=blobdiff_plain;f=youtube_dl%2F__main__.py;h=7022ea4bec75fb864cd58c3c3c9b5f2a15bc5d7a;hb=d81edc573e35cb5502f2b5e52323b980600c0c8b;hp=8c12bfb6477ff7f7626937ff373757539870baeb;hpb=9e8056d5a7b6b366874088cd30d23ba4a52d3861;p=youtube-dl diff --git a/youtube_dl/__main__.py b/youtube_dl/__main__.py index 8c12bfb64..7022ea4be 100755 --- a/youtube_dl/__main__.py +++ b/youtube_dl/__main__.py @@ -1,5 +1,15 @@ #!/usr/bin/env python -# -*- coding: utf-8 -*- + +# Execute with +# $ python youtube_dl/__main__.py (2.6+) +# $ python -m youtube_dl (2.7+) + +import sys + +if __package__ is None and not hasattr(sys, "frozen"): + # direct call of __main__.py + import os.path + sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__)))) import youtube_dl