|
21 | 21 | from enthought.traits.api import (HasTraits, Range, Int, Float, \
|
22 | 22 | Bool, Enum, on_trait_change)
|
23 | 23 |
|
24 |
| -try: |
25 |
| - from traitsui.api import View, Item, VSplit, HSplit, Group |
26 |
| -except ImportError: |
27 |
| - try: |
28 |
| - from traits.ui.api import View, Item, VSplit, HSplit, Group |
29 |
| - except ImportError: |
30 |
| - from enthought.traits.ui.api import View, Item, VSplit, HSplit, Group |
31 | 24 |
|
32 | 25 | lh_viewdict = {'lateral': {'v': (180., 90.), 'r': 90.},
|
33 | 26 | 'medial': {'v': (0., 90.), 'r': -90.},
|
@@ -1841,6 +1834,15 @@ class TimeViewer(HasTraits):
|
1841 | 1834 | """ TimeViewer object providing a GUI for visualizing time series, such
|
1842 | 1835 | as M/EEG inverse solutions, on Brain object(s)
|
1843 | 1836 | """
|
| 1837 | + # Nested import of traisui for setup.py without X server |
| 1838 | + try: |
| 1839 | + from traitsui.api import View, Item, VSplit, HSplit, Group |
| 1840 | + except ImportError: |
| 1841 | + try: |
| 1842 | + from traits.ui.api import View, Item, VSplit, HSplit, Group |
| 1843 | + except ImportError: |
| 1844 | + from enthought.traits.ui.api import View, Item, VSplit, HSplit, Group |
| 1845 | + |
1844 | 1846 | min_time = Int(0)
|
1845 | 1847 | max_time = Int(1E9)
|
1846 | 1848 | current_time = Range(low="min_time", high="max_time", value=0)
|
|
0 commit comments