Skip to content

Instantly share code, notes, and snippets.

@omz
Created May 18, 2013 04:25
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save omz/b59196debe7ff2f8e57d to your computer and use it in GitHub Desktop.
Save omz/b59196debe7ff2f8e57d to your computer and use it in GitHub Desktop.
MuntjacHelloWorld
# Minimal 'Hello World' example for muntjac in Pythonista
import sys
sys.path.append('muntjac_pythonista')
from muntjac.api import Application, Window, Label
from muntjac.main import muntjac
class HelloWorld (Application):
def init(self):
main = Window('Hello window')
self.setMainWindow(main)
main.addComponent(Label('Hello World!'))
if __name__ == '__main__':
import webbrowser
webbrowser.open('http://localhost:8880', stop_when_done=True)
muntjac(HelloWorld, nogui=True, forever=True)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment