Fixed with:

        def obOpMenu(self):
                self.oblist = self.canvas.find_withtag('object')
                self.list = []
                for item in self.oblist:
                        self.itemname = self.canvas.gettags(item)
                        if self.itemname[1] != 'default':
                                self.list.append(self.itemname[1])
                self.objectsvars = str(self.list).strip('[]')
                self.var = StringVar(self.root)
                self.var.set(self.objectsvars[0])
                self.f1 = 
open('/home/david/pythonfiles/pythonscripts/roughdraftapps/kubit_kaaba/other.py','w')
                self.f1.write("""from Tkinter import *
def thisDef(frame,var):
        optionmenu = OptionMenu(frame,var,%s)
        optionmenu.grid(row = 1,column = 2)
        return optionmenu""" % (str(self.list).strip('[]')))
                self.f1.close()
                from other import *
                self.optionmenu = thisDef(self.frame,self.var)
_______________________________________________
Tutor maillist  -  [email protected]
To unsubscribe or change subscription options:
http://mail.python.org/mailman/listinfo/tutor

Reply via email to