Skip to content

Keep bottom_toolbar visible between prompts #752

@Alphapage

Description

@Alphapage

Hello,

Here is my sample code:

from prompt_toolkit import prompt
from prompt_toolkit.formatted_text import HTML

def bottom_toolbar():
    return HTML('This is a <b><style bg="ansired">Toolbar</style></b>!')



def main():
    print('A test')
    text=prompt('> ', bottom_toolbar=bottom_toolbar)
    print('You said: %s' % text)
    text = prompt('> ', bottom_toolbar=bottom_toolbar)
    print('You said: %s' % text)


if __name__ == '__main__':
    main()

I want to keep the bottom_toolbar always visible, but as soon as I print something, then the bottom_toolbar disappears.

Is there a print(text:str,bottom_toolbar) function available in prompt_toolkit or maybe I can run/show/hide the bottom_toolbar without using prompt ?

Thank you in advance for your help.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions