summaryrefslogtreecommitdiffstats
path: root/module-init.py
blob: bc5f31b7e94be1d137fca0b89eb9dcdd5ae80fad (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35

# Trinity-specific paths
import sys, os
tqt_modules = []
for m_path in sys.path:
    if os.path.exists(os.path.join(m_path, 'sip4_tqt')):
        m_sip_dir = os.path.join(m_path, 'sip4_tqt')
        tqt_modules.insert(0, m_sip_dir)
    if os.path.exists(os.path.join(m_path, 'python_tqt')):
        m_pyqt_dir = os.path.join(m_path, 'python_tqt')
        tqt_modules.insert(0, m_pyqt_dir)
for m_path in tqt_modules:
    sys.path.insert(0, m_path)

# Base modules
__all__ = [
 'qt',
 'qtcanvas',
 'qtnetwork',
 'qttable',
 'qtsql',
 'qtui',
 'qtxml',
]

# Optional modules
if os.path.exists(os.path.join(m_pyqt_dir, 'qtaxcontainer.so')):
    __all__.append('qtaxcontainer')
if os.path.exists(os.path.join(m_pyqt_dir, 'qtext.so')):
    __all__.append('qtext')
if os.path.exists(os.path.join(m_pyqt_dir, 'qtgl.so')):
    __all__.append('qtgl')

# Import namespaces
from python_tqt import *