aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPhilipp Hagemeister <phihag@phihag.de>2012-11-28 03:34:40 +0100
committerPhilipp Hagemeister <phihag@phihag.de>2012-11-28 03:34:40 +0100
commit9e8056d5a7b6b366874088cd30d23ba4a52d3861 (patch)
treed11eede0719399ed0f55e68e38c4b73eae5948f2
parentc6f3620859228754434d21c396ce5a655e972828 (diff)
Use relative imports
-rw-r--r--youtube_dl/FileDownloader.py4
-rw-r--r--youtube_dl/InfoExtractors.py4
-rw-r--r--youtube_dl/PostProcessor.py4
-rw-r--r--youtube_dl/__init__.py9
-rwxr-xr-xyoutube_dl/__main__.py4
5 files changed, 16 insertions, 9 deletions
diff --git a/youtube_dl/FileDownloader.py b/youtube_dl/FileDownloader.py
index 9dc3523e0..a135be352 100644
--- a/youtube_dl/FileDownloader.py
+++ b/youtube_dl/FileDownloader.py
@@ -1,6 +1,8 @@
#!/usr/bin/env python
# -*- coding: utf-8 -*-
+from __future__ import absolute_import
+
import math
import os
import re
@@ -12,7 +14,7 @@ import time
if os.name == 'nt':
import ctypes
-from utils import *
+from .utils import *
class FileDownloader(object):
diff --git a/youtube_dl/InfoExtractors.py b/youtube_dl/InfoExtractors.py
index d1b239abf..b4f9ee194 100644
--- a/youtube_dl/InfoExtractors.py
+++ b/youtube_dl/InfoExtractors.py
@@ -1,6 +1,8 @@
#!/usr/bin/env python
# -*- coding: utf-8 -*-
+from __future__ import absolute_import
+
import datetime
import netrc
import os
@@ -12,7 +14,7 @@ import xml.etree.ElementTree
import random
import math
-from utils import *
+from .utils import *
class InfoExtractor(object):
diff --git a/youtube_dl/PostProcessor.py b/youtube_dl/PostProcessor.py
index c771a6245..af00f80ee 100644
--- a/youtube_dl/PostProcessor.py
+++ b/youtube_dl/PostProcessor.py
@@ -1,12 +1,14 @@
#!/usr/bin/env python
# -*- coding: utf-8 -*-
+from __future__ import absolute_import
+
import os
import subprocess
import sys
import time
-from utils import *
+from .utils import *
class PostProcessor(object):
diff --git a/youtube_dl/__init__.py b/youtube_dl/__init__.py
index a0caa21b0..bf0ce14ec 100644
--- a/youtube_dl/__init__.py
+++ b/youtube_dl/__init__.py
@@ -2,6 +2,7 @@
# -*- coding: utf-8 -*-
from __future__ import with_statement
+from __future__ import absolute_import
__authors__ = (
'Ricardo Garcia Gonzalez',
@@ -39,10 +40,10 @@ import subprocess
import sys
import warnings
-from utils import *
-from FileDownloader import *
-from InfoExtractors import *
-from PostProcessor import *
+from .utils import *
+from .FileDownloader import *
+from .InfoExtractors import *
+from .PostProcessor import *
def updateSelf(downloader, filename):
''' Update the program file with the latest version from the repository '''
diff --git a/youtube_dl/__main__.py b/youtube_dl/__main__.py
index acb36e770..8c12bfb64 100755
--- a/youtube_dl/__main__.py
+++ b/youtube_dl/__main__.py
@@ -1,7 +1,7 @@
#!/usr/bin/env python
# -*- coding: utf-8 -*-
-import __init__
+import youtube_dl
if __name__ == '__main__':
- __init__.main()
+ youtube_dl.main()