Python Forum
Need help with a script (indentation)
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Need help with a script (indentation)
#4
if mybutton != previousstate:
    if mybutton == True:
        print "Du har post :)"
res = p.push("Min Raspberry Pi", 'Advarsel', 'Luke Lukket', batch_mode=False)
    else:
print "Du har post :)"
res on line 4 brings you out of the first if statement so else from second if(line 2) shouldn't do anything. is that intentional?
Reply


Messages In This Thread
RE: Need help with a script (indentation) - by pseudo - Oct-04-2018, 09:46 AM

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020