from pitftgpio import PiTFT_GPIO

pitft = PiTFT_GPIO()

while True:
    if pitft.Button1:
        print "Button 1 pressed - screen off"
        #pitftf.Backlight(False)
    if pitft.Button2:
        print "Button 2 pressed - screen on"
        #pitft.Backlight(True) 
    if pitft.Button3:
        print "Button 3 pressed"
    if pitft.Button4:
        print "Button 4 pressed"
f2ecbe9b4409acbf7f1a0f2c97993eae07f85b47
from pitftgpio import PiTFT_GPIO

pitft = PiTFT_GPIO()

while True:
    if pitft.Button1:
        print "Button 1 pressed - screen off"
        #pitftf.Backlight(False)
    if pitft.Button2:
        print "Button 2 pressed - screen on"
        #pitft.Backlight(True) 
    if pitft.Button3:
        print "Button 3 pressed"
    if pitft.Button4:
        print "Button 4 pressed"