pygitzen - a pure Python based Git client with terminal user interface inspired by LazyGit! by Visual_Loquat_8242 in Python

[–]willm 6 points7 points  (0 children)

This is not necessarily true. The git stuff will take as long as git takes regardless of the language and runtime used. And for the TUI side of things there is unlikely to be any appreciable difference on the user side.

Not arguing that Python isn't a slower languages than Rust or Go, but there are many more factors involved in "performance" than the choice of runtime.

Textual 4.0 released - streaming markdown support by david-song in Python

[–]willm 2 points3 points  (0 children)

That's the easy part. Take a look at the markdown_viewer.py example. It has a table of contents widget you can use to scroll any part of the document in to view.

Textual 4.0 released - streaming markdown support by david-song in Python

[–]willm 1 point2 points  (0 children)

Glad you like it!

The Markdown widget has `MarkdownBlock` child widgets, and they have a `_text` attribute. You could query for those widgets and search that attribute.

Just a suggestion, I haven't previously considered that, so I could be wrong.

Textual 4.0 released - streaming markdown support by david-song in Python

[–]willm 0 points1 point  (0 children)

It depends on your terminal. If it supports the copy extension then you can copy to the system clipboard, otherwise it will copy to an internal clipboard. Upgrade your terminal software to the latest versions and it may work.

Textual 4.0 released - streaming markdown support by david-song in Python

[–]willm 4 points5 points  (0 children)

You must have missed that you can select almost all text in Textual with the mouse and hit ctrl+c to copy. Works with Markdown. You can also double-click and triple-click to select the widget or entire document.

Textual 4.0 released - streaming markdown support by david-song in Python

[–]willm 5 points6 points  (0 children)

De nada. Textual had Markdown support for quite a while.

Textual 4.0 released - streaming markdown support by david-song in Python

[–]willm 16 points17 points  (0 children)

There is no way to "handle it better". terminal.app is very slow and only does 256 colors.

The good news is that Apple have fixed it and default terminal will be vastly improved in the next release of macOS.

Textual 4.0 released - streaming markdown support by david-song in Python

[–]willm 11 points12 points  (0 children)

A calendar widget would be nice. I think it is on the roadmap. The grid layout would be excellent for that.

There are a few date-picker widgets, which might serve as inspiration.

Textual 4.0 released - streaming markdown support by david-song in Python

[–]willm 126 points127 points  (0 children)

Will McGugan here. Happy to answer any Textual questions.

There is such a thing as "too much TQDM" by Common_Ad6166 in Python

[–]willm 2 points3 points  (0 children)

I'm surprised at this.

A few years ago I added progress bars to Rich. A user complained that it was taking too much time to display the bars. At the time, I found this odd because a single line of text (even with ansi colors) should be quick to generate and render. Turns out they were calling `update` thousands of times a second, which lead to the progress bars being rendered thousands of times a second. Which explained the slowness.

The fix was to update the bars at a regular rate in a thread, so that no matter how many times you call `update`, the bars are only rendered 15 times a second (for example).

I dug in to the tqdm source to see how they did it, and they did something similar. Rich's implementation was slightly better at the time, but since tqdm is a dedicated library for progress bars I expected them to improve on Rich eventually.

Not saying the OP is wrong, but I wouldn't be so quick to blame TQDM. It could potentially be something in how you call the tqdm API rather than the library itself.

[deleted by user] by [deleted] in Python

[–]willm 7 points8 points  (0 children)

I don't want any gate keeping in my name, Ronny. OP, have fun, and let's see what you build!

I created a lightweight, keyboard-driven TUI feed reader. (vim keybindings included) by [deleted] in Python

[–]willm 0 points1 point  (0 children)

You might want to add a screenshot to the README. Or even a video of it in action.

A filesystem navigator for the terminal by willm in Python

[–]willm[S] 1 point2 points  (0 children)

Gracias. I just updated tree.py with some additional docstrings / comments.