#!/usr/bin/env python # -*- coding: cp1252 mode:python -*- # listbox1.py # (C) Håvard Dahle, 2004 # License: GPL BLOGID = "SHOT" HOST= "http://www.orakel.ntnu.no/~havardda/blogg/xmlrpc.php" # your host USERNAME = "" # your username PASSWORD = "" # your password from wax import * import xmlrpclib class MainFrame(Frame): def Body(self): # the panel isn't really necessary, but we can use it to add a border p1 = Panel(self, direction='v') self.titlebox = TextBox(p1, "title") p1.AddComponent(self.titlebox, border=3, stretch=1, expand=0) self.postbox = TextBox(p1, "post", multiline=1, size=(300,300)) p1.AddComponent(self.postbox, border=3, stretch=1, expand=1) btn = Button(p1, "New post") p1.AddComponent(btn, border=1, stretch=0, expand=0) p1.Pack() btn.OnClick = self.post self.AddComponent(p1, border=5, stretch=1, expand=1) self.Pack() def post(self, event): title = self.titlebox.GetValue() content = "