def OnClick(self,event): a=int(self.editname1.GetValue()) p=int(self.editname5.GetValue()) p=p/100.0 l=int(self.editname6.GetValue()) w=int(self.editname7.GetValue()) h=int(self.editname8.GetValue()) #r=1 #print self.str1 #print self.str2 if(self.str1=='primitive'): cubic.main(a,l,w,h,p) if(self.str1=='bodycentered'): cubicbc.main(l,w,h,a,p) if(self.str1=='face centered'): cubicfc.main(l,w,h,a,p) # remove previous controls self.Close(True) self.Destroy() return
def OnClick(self, event): self.Close() a = float(self.editname1.GetValue()) p = float(self.editname5.GetValue()) p = p / 100.0 l = int(self.editname6.GetValue()) w = int(self.editname7.GetValue()) h = int(self.editname8.GetValue()) # r=1 # print self.str1 # print self.str2 if self.str1 == "primitive": cubic.main(l, w, h, a, p) if self.str1 == "bodycentered": cubicbc.main(l, w, h, a, p) if self.str1 == "face centered": cubicfc.main(l, w, h, a, p) # remove previous controls return
import wx import cubic if __name__=='__main__': app=wx.PySimpleApp() na=['cubic','2','3','4'] modal=wx.SingleChoiceDialog(None,"harry potter","title here",na) if modal.ShowModal()==wx.ID_OK: print "see whether it runs %s\n" % modal.GetStringSelection() cubic.main(1,1,1,2,1,0.5) modal.Destroy()