X-Git-Url: https://git.ucc.asn.au/?p=uccvend-vendserver.git;a=blobdiff_plain;f=virtualvend%2Fvvend.py;h=bb38c589cf4bb84b7bbbf9ec62827ba257c3c3b2;hp=40e44de74b61acfa6297f345c2d15a2e9a1605b0;hb=6e3e85b01d6022142568306d542ae842bfec9cf1;hpb=b6c977767ce505def88a3cf4cb5413c3b6c634bc diff --git a/virtualvend/vvend.py b/virtualvend/vvend.py index 40e44de..bb38c58 100644 --- a/virtualvend/vvend.py +++ b/virtualvend/vvend.py @@ -22,6 +22,8 @@ except: print "/usr/local/lib/python2.2/site-packages/" sys.exit(1) +import pango + #now we have both gtk and gtk.glade imported #Also, we know we are running GTK v2 @@ -58,6 +60,8 @@ class appgui: "on_vvend_delete_event" : self.quit } self.wTree.signal_autoconnect (dic) display = self.wTree.get_widget("label1") + label_font = pango.FontDescription('monospace 28') + display.modify_font(label_font) display.set_text("*5N4CK0RZ*") # vending machine password set here @@ -245,7 +249,7 @@ Mark Tearle, June 2004 def do_vend_all(self): for i in range(11,99): - self.do_send("101 Vending ",i,"\n") + self.do_send("101 Vending "+str(i)+"\n") self.do_send("153 Home sensors failing\n") self.do_send("102 Vend all motors complete\n") @@ -254,12 +258,12 @@ Mark Tearle, June 2004 if fail: self.do_send("153 Home sensors failing\n") else: - self.insert("Vending ",command) + self.insert("Vending "+command) self.do_send("100 Vend successful\n") def do_display(self,string): display = self.wTree.get_widget("label1") - display.set_text("%10.10s" % (string)) + display.set_text("%-10.10s" % (string)) self.do_send('300 Written\n') def do_beep(self,command):