예제 #1
0
 def there():
     ret = AppMenu.show("Where's there?",
                        "Spain France Albania".split() +
                        [("Quit", AppMenu.quit)],
                        multiselect=True,
                        back_on_abort=True)
     print(ret)
     return ret
예제 #2
0
def go():
    def back():
        print("Going back.")
        AppMenu.back()

    def there():
        ret = AppMenu.show("Where's there?",
                           "Spain France Albania".split() +
                           [("Quit", AppMenu.quit)],
                           multiselect=True,
                           back_on_abort=True)
        print(ret)
        return ret

    return AppMenu.show("Go Where?", [("YELLOW<<Back>>", back),
                                      ("GREEN<<There>>", there)])
예제 #3
0
파일: app2.py 프로젝트: koreno/termenu
def go():
    def back():
        print("Going back.")
        AppMenu.back()

    def there():
        ret = AppMenu.show("Where's there?",
            "Spain France Albania".split() + [("Quit", AppMenu.quit)],
            multiselect=True, back_on_abort=True)
        print(ret)
        return ret

    return AppMenu.show("Go Where?", [
        ("YELLOW<<Back>>", back),
        ("GREEN<<There>>", there)
    ])
예제 #4
0
import time
from termenu.app import AppMenu


def leave():
    print("Leave...")
    AppMenu.quit()


def go():
    def back():
        print("Going back.")
        AppMenu.back()

    def there():
        ret = AppMenu.show("Where's there?",
                           "Spain France Albania".split() +
                           [("Quit", AppMenu.quit)],
                           multiselect=True,
                           back_on_abort=True)
        print(ret)
        return ret

    return AppMenu.show("Go Where?", [("YELLOW<<Back>>", back),
                                      ("GREEN<<There>>", there)])


if __name__ == "__main__":
    AppMenu.show("Make your MAGENTA<<decision>>", [("RED<<Leave>>", leave),
                                                   ("BLUE<<Go>>", go)])
예제 #5
0
파일: app2.py 프로젝트: koreno/termenu
 def there():
     ret = AppMenu.show("Where's there?",
         "Spain France Albania".split() + [("Quit", AppMenu.quit)],
         multiselect=True, back_on_abort=True)
     print(ret)
     return ret
예제 #6
0
파일: app2.py 프로젝트: koreno/termenu
import time
from termenu.app import AppMenu

def leave():
    print("Leave...")
    AppMenu.quit()

def go():
    def back():
        print("Going back.")
        AppMenu.back()

    def there():
        ret = AppMenu.show("Where's there?",
            "Spain France Albania".split() + [("Quit", AppMenu.quit)],
            multiselect=True, back_on_abort=True)
        print(ret)
        return ret

    return AppMenu.show("Go Where?", [
        ("YELLOW<<Back>>", back),
        ("GREEN<<There>>", there)
    ])

if __name__ == "__main__":
    AppMenu.show("Make your MAGENTA<<decision>>", [
        ("RED<<Leave>>", leave),
        ("BLUE<<Go>>", go)
    ])