and now, also py2exe compiles fine :) (on Windows)
[youtube-dl] / youtube_dl / __main__.py
index 8c12bfb6477ff7f7626937ff373757539870baeb..7f8410f2a7e4d3d1866459a92a558ae3c41d07c4 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 and not hasattr(sys, "frozen"):
+    import os.path
+    sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
 
 import youtube_dl