def build(self): with enaml.imports(): from hello_world_view import Main view = Main(message="Hello World, from Python!") view.show() return super(EnamlKvApp, self).build()
def main(): with enaml.imports(): from hello_world_view import Main app = QtApplication() view = Main(message="Hello World, from Python!") view.show() # Start the application event loop app.start()
#------------------------------------------------------------------------------ # Copyright (c) 2011, Enthought, Inc. # All rights reserved. #------------------------------------------------------------------------------ import enaml with enaml.imports(): from hello_world_view import Main view = Main(message="Hello, world, from Python!") view.show()
#------------------------------------------------------------------------------ # Copyright (c) 2011, Enthought, Inc. # All rights reserved. #------------------------------------------------------------------------------ import enaml from enaml.stdlib.sessions import show_simple_view if __name__ == '__main__': with enaml.imports(): from hello_world_view import Main main_view = Main() show_simple_view(main_view)