Toots for willmcgugan@mastodon.social account

Written by Will McGugan on 2025-01-23 at 11:57

This snippet of code represents the best bang for your buck when it comes to profiling #Python code.

@timer("is this slow")

def my_func():

...

with timer("is this slow"):

my_func()

Replace the log with a print for other projects.

Feels almost stdlib worthy...

=> View attached media

=> More informations about this toot | View the thread

Written by Will McGugan on 2025-01-10 at 18:21

Did you know you can play a "game" on the Textualize website??

Go to https://textual.textualize.io

Scroll down.

Click Start

Click the app

Press G

=> View attached media

=> More informations about this toot | View the thread

Written by Will McGugan on 2025-01-06 at 17:38

I do believe I nailed text selection in #Textual

Coming to the next version...

[#]Python

=> View attached media

=> More informations about this toot | View the thread

Written by Will McGugan on 2025-01-03 at 15:50

Some widgets are a special case when it comes to text selection.

The Digits widget displays a number with box characters. You can select digits as a whole, and when you copy them you get a readable string, and not a jumble of funny characters.

[#]Textual #Python

=> View attached media

=> More informations about this toot | View the thread

Written by Will McGugan on 2025-01-03 at 09:31

Arbitrary text selection is working in Textual.

This was an ordeal to get working. A few more gray hairs in my beard from this PR.

[#]Textual #Python

=> View attached media

=> More informations about this toot | View the thread

Written by Will McGugan on 2024-12-30 at 16:13

Been implementing text selection in #Textual

The final boss was selecting justified text. This was challenging because there isn't a simple relationship between the text on screen and the source text.

It's about 90% of the way there. Just have to implement the last 90%.

[#]Python

=> View attached media

=> More informations about this toot | View the thread

Written by Will McGugan on 2024-12-29 at 20:53

Enjoying Squid Game S02. Just watched Ep 3, and I'm still hooked.

=> More informations about this toot | View the thread

Written by Will McGugan on 2024-12-29 at 14:09

A Mastodon TUI from @edward_jazzhands !

=> View attached media

=> More informations about this toot | View the thread

Written by Will McGugan on 2024-12-29 at 14:05

I just tooted this from a Terminal!

=> More informations about this toot | View the thread

Written by Will McGugan on 2024-12-24 at 22:12

Much to the chagrin of us atheists, the war against Xmas has failed again this year -- and I will once again be forced to eat roast potatoes and poultry.

Merry Xmas to those who do that. And a convivial Wednesday to those who don't. 🎄

=> More informations about this toot | View the thread

Written by Will McGugan on 2024-12-23 at 17:04

I think this is the behavior most people would expect for text selection, for left to right languages.

Problems like this interest me, as there is no obvious perfect solution. Even browsers disagree.

I may offer a modifier key to do a rectangular select in the future.

[#]Textual #Python

https://www.youtube.com/watch?v=WSPK6885TiE&ab_channel=WillMcGugan

=> More informations about this toot | View the thread

Written by Will McGugan on 2024-12-23 at 14:06

Text selection with the demo app.

Some breakages in rendering, which I know the cause of.

Also implemented double click and triple click to select, on top of click and drag.

[#]Python #Textual

=> View attached media

=> More informations about this toot | View the thread

Written by Will McGugan on 2024-12-23 at 13:28

Work on text selection in Textual is progressing nicely.

Double click to select, triple click to select all, and drag to select.

[#]Textual #Python

=> View attached media

=> More informations about this toot | View the thread

Written by Will McGugan on 2024-12-12 at 15:29

If you aren't near a terminal, you can try the demo out online.

https://textual-web.io/textualize/demo

If you are near a terminal, give this a shot:

uvx --python 3.12 textual-demo

=> View attached media

=> More informations about this toot | View the thread

Written by Will McGugan on 2024-12-12 at 15:28

Textual 1.0 has been released. 🥳

Three years in the making. A #python TUI framework that is bigger than the terminal.

To celebrate, I want to give away some trade secrets. Because I am appalling at keeping secrets.

Tell me what you think of the diagrams...

https://textual.textualize.io/blog/2024/12/12/algorithms-for-high-performance-terminal-apps/

=> More informations about this toot | View the thread

Written by Will McGugan on 2024-12-11 at 21:41

Been working on the Textual README in advance of tomorrow's 1.0 release.

Had to make use of some old-school web development for the formatting. Hope GitHub don't hate me for it.

WDYT of the README?

https://github.com/Textualize/textual

=> More informations about this toot | View the thread

Written by Will McGugan on 2024-12-07 at 16:54

Is there anything in #Textual that makes you think "how the duck did they do that?"

I'm finally writing that blog post about the magic behind Textual, and I'm taking requests...

[#]Python

=> View attached media | View attached media

=> More informations about this toot | View the thread

Written by Will McGugan on 2024-11-28 at 19:58

Wanted to share some screenshot of a #Textual app currently in development, because I think it is gorgeous.

Lots more on our Discord server!

https://discord.gg/Enf6Z3qhVr

[#]python

=> View attached media | View attached media

=> More informations about this toot | View the thread

Written by Will McGugan on 2024-11-26 at 11:56

Would you like to try out this game in your terminal?

Of course you would!

Click here 👇

https://github.com/Textualize/textual-demo

[#]Python #Textual

=> View attached media

=> More informations about this toot | View the thread

Written by Will McGugan on 2024-11-24 at 14:54

Textual 0.87.0 Is an Absolute Unit of a release! 😎🤓🫶

This version adds support for position: absolute

Additionally, there is a fun game in the demo.

https://github.com/Textualize/textual/releases/tag/v0.87.0

[#]Python #Textual

=> View attached media

=> More informations about this toot | View the thread

=> This profile with reblog | Go to willmcgugan@mastodon.social account

Proxy Information
Original URL
gemini://mastogem.picasoft.net/profile/465551
Status Code
Success (20)
Meta
text/gemini
Capsule Response Time
385.280938 milliseconds
Gemini-to-HTML Time
7.958527 milliseconds

This content has been proxied by September (ba2dc).