SIP4 python bindings for TQt
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

1234567891011121314151617181920212223242526272829303132333435
  1. # Trinity-specific paths
  2. import sys, os
  3. tqt_modules = []
  4. for m_path in sys.path:
  5. if os.path.exists(os.path.join(m_path, 'sip4_tqt')):
  6. m_sip_dir = os.path.join(m_path, 'sip4_tqt')
  7. tqt_modules.insert(0, m_sip_dir)
  8. if os.path.exists(os.path.join(m_path, 'python_tqt')):
  9. m_pyqt_dir = os.path.join(m_path, 'python_tqt')
  10. tqt_modules.insert(0, m_pyqt_dir)
  11. for m_path in tqt_modules:
  12. sys.path.insert(0, m_path)
  13. # Base modules
  14. __all__ = [
  15. 'qt',
  16. 'qtcanvas',
  17. 'qtnetwork',
  18. 'qtsql',
  19. 'qttable',
  20. 'qtui',
  21. 'qtxml',
  22. ]
  23. # Optional modules
  24. if os.path.exists(os.path.join(m_pyqt_dir, 'qtaxcontainer.so')):
  25. __all__.append('qtaxcontainer')
  26. if os.path.exists(os.path.join(m_pyqt_dir, 'qtext.so')):
  27. __all__.append('qtext')
  28. if os.path.exists(os.path.join(m_pyqt_dir, 'qtgl.so')):
  29. __all__.append('qtgl')
  30. # Import namespaces
  31. from python_tqt import *