Commits

Pierre Carbonnelle committed 5ea3088

simplify internal imports

Comments (0)

Files changed (4)

pyDatalog/__init__.py

 
-try:
-    from . import version
-    from . import Logic
-except ValueError:
-    import version
-    import Logic
+from . import version
+from . import Logic
     
 Logic = Logic.Logic # give easy access to the Logic class
 

pyDatalog/pyDatalog.py

 import string
 import weakref
 
-try:
-    from . import version
-    from . import Logic
-    from . import pyEngine
-    from . import pyParser
-    from . import util
-except ValueError:
-    import version
-    import Logic
-    import pyEngine
-    import pyParser
-    import util
+from . import version
+from . import Logic
+from . import pyEngine
+from . import pyParser
+from . import util
     
 print("pyDatalog version %s" % version.__version__)
 

pyDatalog/pyEngine.py

 import threading
 import weakref
 
-try:
-    from . import util
-except ValueError:
-    import util
+from . import util
 
 Logging = False # True --> logging is activated.  Kept for performance reason
 Auto_print = False # True => automatically prints the result of a query

pyDatalog/pyParser.py

 PY3 = sys.version_info[0] == 3
 func_code = '__code__' if PY3 else 'func_code'
 
-try:
-    from . import pyEngine
-    from . import util
-    from . import UserList
-except ValueError:
-    import pyEngine
-    import util
-    import UserList
+from . import pyEngine
+from . import util
+from . import UserList
 
 # global variable to differentiate between in-line queries and pyDatalog program / ask
 Thread_storage = threading.local()