functional programming - Python:Expect an indentend Block -


i searching hours can't find mistake:

this code: http://pastebin.com/sdbtvlqb

i error:

expect indented block 

in cases there missing tabulator or similar cant find it? other wrong in there maybe cause error? if run class myapp fine. if had new class "manual_control" error.

this working part:

class myapp(object):     """"""      #----------------------------------------------------------------------     def __init__(self, parent):         """constructor"""         self.root = parent         self.root.configure(background='blue')         self.root.title("kranken trage")          self.frame = tk.frame(parent,background='blue')         self.frame.pack()          uebschrift= tk.label(self.frame,text="kranken-transport",font = "verdana 30 bold",fg="red").pack()          btnrooms = tk.button(self.frame,text ="räume")         btnrooms.config(height=3,width=15,font= "arial 40")         btnrooms.pack(pady=5)          test = tk.button(self.frame,text ="test modus")         test.config(height=3,width=15,font= "arial 40")         test.pack(padx=10,pady=5)          btnmanualcontrol = tk.button(self.frame,text = "manuele steuerung",command=openmanualcontrol)         btnmanualcontrol.config(height=3,width=15,font= "arial 40")         btnmanualcontrol.pack(padx=10,pady=5 )      #----------------------------------------------------------------------     def hide(self):         """"""         self.root.withdraw()      #----------------------------------------------------------------------     def openrooms(self):         """"""         self.hide()         subframe = rooms(self)      #----------------------------------------------------------------------     def openmanualcontrol(self):         """"""         self.hide()         subframe = manual_control(self)          #----------------------------------------------------------------------     def show(self):         """"""         self.root.update()         self.root.deiconify()  #---------------------------------------------------------------------- if __name__ == "__main__":     root = tk.tk()     root.geometry("700x700")     app = myapp(root)     root.mainloop() 

in manual_control class did not indent comments.

class manual_control(): """     gpio.setmode(gpio.bcm)     # other code """     mcfenster = tkinter.tk() 

should

class manual_control():     """     gpio.setmode(gpio.bcm)     # other code     """     mcfenster = tkinter.tk() 

Comments

Popular posts from this blog

routing - AngularJS State management ->load multiple states in one page -

python - GRASS parser() error -

Swift game error message -