Questions tagged [prompt-toolkit]

prompt_toolkit is a library for building powerful interactive command lines and terminal applications in Python.

prompt_toolkit is a library for building powerful interactive command lines and terminal applications in Python.

You will find the source code and relevant links to documentation, tutorial, examples here: https://github.com/jonathanslenders/python-prompt-toolkit

58 questions
1
vote
1 answer

How to cycle the kill ring in ipython5?

IPython 5 has a bunch of neat new editing features, but it seems like cycling the kill ring is MIA. Cycling the kill ring is done in IPython 4 (and any other readline-based program) by issuing a Alt-y following a yank (Ctrl-y). Is this functionality…
mgalgs
  • 15,671
  • 11
  • 61
  • 74
0
votes
0 answers

How to fix "the kernel failed to start due to the missing module 'prompt_toolkit.formatted_text'." in visual studio code

I keep getting this error The kernel failed to start due to the missing module 'prompt_toolkit.formatted_text'. Consider installing this module on anaconda navigator i have prompt_toolkit 3.0.2.0 installed i tried to upgrade but the error kept…
0
votes
0 answers

Add binding to finish input and execute the command in multiline mode using Shit+Enter on Mac Terminal?

The default is esc + enter, but (how) can I bind that as command + enter or control + enter?
Lerner Zhang
  • 6,184
  • 2
  • 49
  • 66
0
votes
0 answers

How to set mappings in vi_mode for prompt_toolkit.prompt?

I want to add this setting to the vi mode: inoremap jj `` Is it possible now?
Lerner Zhang
  • 6,184
  • 2
  • 49
  • 66
0
votes
1 answer

Change the color of placeholder text of prompt_toolkit prompt in Python?

The following is my code that causes this error: TypeError: argument of type 'HTML' is not iterable from prompt_toolkit import prompt from prompt_toolkit.formatted_text import FormattedText, HTML def get_input(): prompt_text = [ …
Lerner Zhang
  • 6,184
  • 2
  • 49
  • 66
0
votes
0 answers

from prompt_toolkit.key_binding.vi_state import InputMode ModuleNotFoundError: No module named 'prompt_toolkit.key_binding'

I am running some sample code and have the prompt toolkit library installed but I keep getting this error. Any clues ? I tried to check the library that the file is there and it is. In the library file, the import statement that fails shows that…
0
votes
0 answers

Why does my prompt-toolkit Dialog flicker on terminal output with asyncio and patch_stout?

When running a prompt-toolkit Dialog it will flicker if there is terminal output from a different asyncio task. I am using the context with patch_stdout() within a task as mentioned in the doc, at least as far as I understand it. I read somewhere…
Joe
  • 6,758
  • 2
  • 26
  • 47
0
votes
0 answers

How to combine more than one dialog box in python prompt toolkit

Hello as you can see in the documentation below for python-prompt toolkit there is documentation on prompt dialog boxes. I am trying to combine an input and radio button dialog box into one dialog box. Does anyone know if there is a way to do this.…
Adil Ali
  • 7
  • 5
0
votes
1 answer

Auto-refresh of prompt-toolkit fullscreen app

I'm trying to get a bit into prompt-toolkit for building CLI apps. Maybe it's a trivial question, but I could not find any solution in the docs or in other posts. I want to build a full-screen app with prompt-toolkit, that monitors and displays…
Aranvir
  • 41
  • 3
0
votes
0 answers

how to install prodigy in Anaconda prompt

I am getting this error below while installing prodigy in Anaconda prompt for code pip install prodigy -f \\imslprad01\Area51\Divya\to\wheels ERROR: Could not install packages due to an OSError: [WinError 5] Access is…
0
votes
1 answer

How to create unittests for python prompt toolkit Full Screen App?

I am creating a Full-Screen TUI app using python-prompt-toolkit (https://github.com/prompt-toolkit/python-prompt-toolkit) I don't know how to make a unittests for it. Example…
Hopa
  • 1
  • 1
0
votes
1 answer

Storing list elements in brackets

I have a list and I'm trying to fill it with bracketed elements. In it's simplest form, my issue is that I want example=([]) to become example=([('a','b'),('c','d')]). More explicitly, I'm trying to turn the runnable snippet of code below into a…
Solebay Sharp
  • 519
  • 7
  • 24
0
votes
1 answer

mypy incompatible types list has the type list

I am using prompt-toolkit python library with the code: from __future__ import annotations from prompt_toolkit.shortcuts import checkboxlist_dialog results: list[str] = checkboxlist_dialog( title="CheckboxList dialog", text="What would you…
staticdev
  • 2,950
  • 8
  • 42
  • 66
0
votes
1 answer

prompt_toolkit and extra backslash escapes

I'm working on a CPython project that uses prompt-toolkit for tab completion of almost-POSIXy folders in a hierarchical password store. I'm finding that if I pass \"kl into Completion(text=n, display=n + '/', start_position=-len(name)) as text=n,…
dstromberg
  • 6,954
  • 1
  • 26
  • 27
0
votes
1 answer

python-prompt-toolkit: make container scrollable

I am trying to make a Container scrollable using ScrollablePane.But I can't scroll either with mouse or keyboard from prompt_toolkit.layout.controls import FormattedTextControl from prompt_toolkit import Application from prompt_toolkit.layout import…
FBR
  • 170
  • 1
  • 2
  • 10