From: Josh Roesslein Date: Tue, 11 Aug 2009 20:41:00 +0000 (-0500) Subject: Use package relative imports. X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=e60f5a8d6b47d27574c51b998675d8e49c49fe83;p=tweepy.git Use package relative imports. --- diff --git a/tweepy/__init__.py b/tweepy/__init__.py index 8b01bb7..d3d67d9 100644 --- a/tweepy/__init__.py +++ b/tweepy/__init__.py @@ -7,12 +7,12 @@ Tweepy Twitter API library """ __version__ = '1.0' -from models import * -from error import TweepError -from api import API -from cache import * -from auth import BasicAuthHandler, OAuthHandler -from streaming import Stream +from . models import * +from . error import TweepError +from . api import API +from . cache import * +from . auth import BasicAuthHandler, OAuthHandler +from . streaming import Stream # Global, unauthenticated instance of API api = API() diff --git a/tweepy/api.py b/tweepy/api.py index 5448cb8..0a74ab1 100644 --- a/tweepy/api.py +++ b/tweepy/api.py @@ -2,9 +2,9 @@ # Copyright 2009 Joshua Roesslein # See LICENSE -from binder import bind_api -from parsers import * -from error import TweepError +from . binder import bind_api +from . parsers import * +from . error import TweepError """Twitter API""" class API(object): diff --git a/tweepy/auth.py b/tweepy/auth.py index 52aced5..49826ee 100644 --- a/tweepy/auth.py +++ b/tweepy/auth.py @@ -6,8 +6,8 @@ from urllib2 import Request, urlopen from urllib import quote import base64 -import oauth -from error import TweepError +from . import oauth +from . error import TweepError class AuthHandler(object): diff --git a/tweepy/binder.py b/tweepy/binder.py index 47a2731..5608aa9 100644 --- a/tweepy/binder.py +++ b/tweepy/binder.py @@ -5,8 +5,8 @@ import httplib import urllib -from parsers import parse_error -from error import TweepError +from . parsers import parse_error +from . error import TweepError def bind_api(path, parser, allowed_param=None, method='GET', require_auth=False, timeout=None, host=None): diff --git a/tweepy/cache.py b/tweepy/cache.py index e7f9e05..28f218d 100644 --- a/tweepy/cache.py +++ b/tweepy/cache.py @@ -2,7 +2,7 @@ # Copyright 2009 Joshua Roesslein # See LICENSE -from __future__ import with_statement +from __future__ import with_statement # need this for py2.5 import time import threading @@ -11,7 +11,7 @@ import hashlib import fcntl import cPickle as pickle -from error import TweepError +from . error import TweepError """Cache interface""" class Cache(object): diff --git a/tweepy/models.py b/tweepy/models.py index 82ca9e2..eb5ec14 100644 --- a/tweepy/models.py +++ b/tweepy/models.py @@ -2,7 +2,7 @@ # Copyright 2009 Joshua Roesslein # See LICENSE -from error import TweepError +from . error import TweepError class Model(object): diff --git a/tweepy/parsers.py b/tweepy/parsers.py index 1216785..a2cda3a 100644 --- a/tweepy/parsers.py +++ b/tweepy/parsers.py @@ -4,7 +4,7 @@ from datetime import datetime -from models import models +from . models import models try: import json