use the new --test option to speed up tests (fetch only first 10K)
[youtube-dl] / youtube_dl / __main__.py
index 8c12bfb6477ff7f7626937ff373757539870baeb..0910e9d1576f261154827a64d828f80a83617418 100755 (executable)
@@ -1,5 +1,14 @@
 #!/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:
+    import os.path
+    sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
 
 import youtube_dl