<s> """<STR_LIT>""" <EOL> import os , sys <EOL> sys . path . append ( os . path . abspath ( r'<STR_LIT>' ) ) <EOL> from pyface . api import GUI , PythonShell , SplitApplicationWindow <EOL> from traits . api import Float , Str <EOL> from file_node_tree import node_manager <EOL> from pyface . tree . api import NodeTree , NodeTreeModel <EOL> class MainWindow ( SplitApplicationWindow ) : <EOL> """<STR_LIT>""" <EOL> ratio = Float ( <NUM_LIT> ) <EOL> direction = Str ( '<STR_LIT>' ) <EOL> def _create_lhs ( self , parent ) : <EOL> """<STR_LIT>""" <EOL> model = NodeTreeModel ( node_manager = node_manager ) <EOL> model . root = os . path . abspath ( os . curdir ) <EOL> self . _tree = NodeTree ( parent , model = model ) <EOL> self . _tree . on_trait_change ( self . _on_tree_anytrait_changed ) <EOL> return self . _tree . control <EOL> def _create_rhs ( self , parent ) : <EOL> """<STR_LIT>""" <EOL> self . _python_shell = PythonShell ( parent ) <EOL> self . _python_shell . bind ( '<STR_LIT>' , self . _tree ) <EOL> self . _python_shell . bind ( '<STR_LIT:w>' , self . _tree ) <EOL> return self . _python_shell . control <EOL> def _on_tree_anytrait_changed ( self , tree , trait_name , old , new ) : <EOL> """<STR_LIT>""" <EOL> print '<STR_LIT>' , trait_name , '<STR_LIT:value>' , new <EOL> return <EOL> if __name__ == '<STR_LIT:__main__>' : <EOL> gui = GUI ( ) <EOL> window = MainWindow ( ) <EOL> window . open ( ) <EOL> gui . start_event_loop ( ) </s>
