-
-
Save omz/b59196debe7ff2f8e57d to your computer and use it in GitHub Desktop.
MuntjacHelloWorld
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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