Fix py3 ImportError by using relative import

This commit is contained in:
Chris Holden 2015-12-22 01:45:55 -05:00
parent 6bef8fab1d
commit 1f1acb81cb

View file

@ -1,6 +1,4 @@
#! /usr/bin/env python
from colortrans import *
from colorsys import hls_to_rgb, rgb_to_hls
# md5 deprecated since Python 2.5
try:
@ -9,6 +7,9 @@ except ImportError:
from hashlib import md5
from sys import argv
# Original, non-relative import errors on Python3
from .colortrans import *
def getOppositeColor(r,g,b):
hls = rgb_to_hls(r,g,b)