From 4cbc508c9e30a404d4c816983fbc8fe9cf9babe9 Mon Sep 17 00:00:00 2001 From: tonysyu Date: Fri, 8 Mar 2013 17:42:58 -0600 Subject: [PATCH] Fix import in example. --- .../demo/Advanced/String_list_ui_editor.py | 21 ++++++++----------- 1 file changed, 9 insertions(+), 12 deletions(-) diff --git a/examples/demo/Advanced/String_list_ui_editor.py b/examples/demo/Advanced/String_list_ui_editor.py index a496fde33..7b202e263 100644 --- a/examples/demo/Advanced/String_list_ui_editor.py +++ b/examples/demo/Advanced/String_list_ui_editor.py @@ -13,20 +13,17 @@ #-- Imports ------------------------------------------------------------------ -from traits.api \ - import HasPrivateTraits, List, Str, Property, on_trait_change +from traits.api import HasPrivateTraits, List, Str, Property, on_trait_change -from traitsui.api \ - import View, HGroup, Item, TabularEditor +from traitsui.api import View, HGroup, Item, TabularEditor +from traitsui.tabular_adapter import TabularAdapter +from traitsui.basic_editor_factory import BasicEditorFactory -from traitsui.tabular_adapter \ - import TabularAdapter - -from traitsui.ui_editor \ - import UIEditor - -from traitsui.basic_editor_factory \ - import BasicEditorFactory +from traits.etsconfig.api import ETSConfig +if ETSConfig.toolkit == 'wx': + from traitsui.wx.ui_editor import UIEditor +else: + from traitsui.qt4.ui_editor import UIEditor #-- Define the reusable StringListEditor class and its helper classes --------