Open a new frame with event results

I am very new, here is the code;
http://asterisklinks.com/wiki/doku.php?id=wiki:wxpython_golf

here is where I am stuck, I just want what is returned from the print
statement to display in a new frame.

  def OnConvert(self, event):
    rate = self.tc1.GetValue()
    n = self.tc2.GetValue()
    acre = self.tc3.GetValue()
    bag = self.tc4.GetValue()
    app = rate / (n / 100.00)
    area = 43.560
    totalbags = app * area * acre / bag
    print "You Should use a total of", totalbags, "bags!"

Another question, is there anyway I can enter 0.5 into;

self.tc1 = wx.lib.intctrl.IntCtrl(panel, -1, value=1, size=(50, -1))

as I have it now I can only enter full numbers.

thanks
david

Hello,

I am very new, here is the code;
http://asterisklinks.com/wiki/doku.php?id=wiki:wxpython_golf

here is where I am stuck, I just want what is returned from the print
statement to display in a new frame.

  def OnConvert(self, event):
    rate = self.tc1.GetValue()
    n = self.tc2.GetValue()
    acre = self.tc3.GetValue()
    bag = self.tc4.GetValue()
    app = rate / (n / 100.00)
    area = 43.560
    totalbags = app * area * acre / bag
    print "You Should use a total of", totalbags, "bags!"

        frame = wx.Frame(None, title="Frame")
        panel = wx.Panel(frame)
        st = wx.StaticText(panel, "You Should use a total of %s bags!" % totalbags)
        frame.Show()

Another question, is there anyway I can enter 0.5 into;

self.tc1 = wx.lib.intctrl.IntCtrl(panel, -1, value=1, size=(50, -1))

as I have it now I can only enter full numbers.

IntCtrl == Integer Control

0.5 is not an Integer

Cody

···

On Sep 30, 2008, at 7:52 PM, david wrote: