__init__.py 640 B

123456789101112131415161718192021
  1. import sys
  2. import os
  3. # this setup is a temporary workaround to deal with the problem of
  4. # having both 'normal' python modules and a wrapper module
  5. # Once all programs use the new interface, we should remove the
  6. # old, and the setup can be made similar to that of the log wrappers.
  7. intree = False
  8. for base in sys.path[:]:
  9. datasrc_libdir = os.path.join(base, 'isc/datasrc/.libs')
  10. if os.path.exists(datasrc_libdir):
  11. sys.path.insert(0, datasrc_libdir)
  12. intree = True
  13. if intree:
  14. from datasrc import *
  15. else:
  16. from isc.datasrc.datasrc import *
  17. from isc.datasrc.sqlite3_ds import *
  18. from isc.datasrc.master import *