Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/colorsc/__init__.py
diff options
context:
space:
mode:
Diffstat (limited to 'colorsc/__init__.py')
-rw-r--r--colorsc/__init__.py21
1 files changed, 21 insertions, 0 deletions
diff --git a/colorsc/__init__.py b/colorsc/__init__.py
index e69de29..3226bb8 100644
--- a/colorsc/__init__.py
+++ b/colorsc/__init__.py
@@ -0,0 +1,21 @@
+import os
+import sys
+import logging
+
+_sys_path = sys.path
+_root_path = os.path.dirname(__file__)
+
+for i in os.listdir(_root_path):
+ path = os.path.join(_root_path, i)
+ if (os.path.isdir(path)):
+ sys.path = _sys_path + [os.path.join('.', path)]
+ try:
+ from colorsclib import *
+ logging.debug('use %s blobs' % path)
+ _sys_path = None
+ break
+ except Exception, e:
+ logging.debug('skip %s blobs: %s' % (path, e))
+
+if _sys_path:
+ raise('cannot find proper binary blobs')