[Python] Can we add clickable text or button to terminal/console in python?

Discussão em 'Python' iniciado por Stack, Maio 14, 2025.

  1. Stack

    Stack Membro Participativo

    For example this is my function:

    def get_sum(item1, item2):
    print(int(item1) + int(item2))


    But I want to trigger that function when user clicks at a certain item in command prompt or any terminal.

    Main question:
    Is it possible to run functions by clicking in terminal?

    Extra:
    And I also saw a VS Code extension development output in terminal. When I run yo code it shows very nice thing. And user can select the things with the arrow keys and press enter to run it. So could this also be possible in python?

    [​IMG]

    Continue reading...

Compartilhe esta Página