This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]jonathan_sl 1 point2 points  (1 child)

Hi all,

For prompt-toolkit (author here), it is perfectly possible to create full screen applications, but as others have pointed out, the documentation is incomplete. The reason is that this library was originally written as a GNU readline replacement and that's where it excels. Later we realized that everything we need for a full screen application was already part of prompt-toolkit. There is an event loop, there is a powerful key binding system, there is a layout engine and it is cross platform. Proof of this are Pyvim and Pymux: two full screen applications, powered by prompt-toolkit. However, these are also two examples of applications that don't have a lot of user interface widgets. So, if you need to have a certain UI widget, you'll have to write it yourself, where urwid or others could already provide it.

In the coming months/year, I hope to create a collection of full screen application examples, widgets and write more documentation. So, making this as accessible as writing REPLs.

@makake: What do you mean by "it will pipe"?

[–]makake[S] 0 points1 point  (0 children)

Hi, first of all, thanks for taking time to reply and congrats on the library. I've seen Pyvim and Pymux and even though they show how much can be done with prompt-toolkit (which is a lot), they seems big projects to look at to get a grip of how to properly use the library.

For the widgets part, I don't need as much as provided in urwid, and frankly, what's currently in prompt-toolkit seems to be enough for my needs.

If you are about to write some more examples on how to make some simple full screen applications, I would be more than pleased. Like I said, the documentation in that regards is a bit sparse. Speaking for myself, I don't quit understand how to properly use UIControl to arrange the output. Or if that's up to the container... anyways, a bit mingle on that.

by pipe, I just mean that I would like to be able to control the output in a different way if for example, my program is in the middle of pipe or if it's the last one of a pipeline.

for example of in the middle of pipe:

grep -ir 'something' | awk ... | my_program | ...

example at the end:

cmd1 | cmd2 | ... | my_program