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()