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...
=> More informations about this toot | View the thread
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
=> More informations about this toot | View the thread
I do believe I nailed text selection in #Textual
Coming to the next version...
[#]Python
=> More informations about this toot | View the thread
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
=> More informations about this toot | View the thread
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
=> More informations about this toot | View the thread
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
=> More informations about this toot | View the thread
Enjoying Squid Game S02. Just watched Ep 3, and I'm still hooked.
=> More informations about this toot | View the thread
A Mastodon TUI from @edward_jazzhands !
=> More informations about this toot | View the thread
I just tooted this from a Terminal!
=> More informations about this toot | View the thread
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
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
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
=> More informations about this toot | View the thread
Work on text selection in Textual is progressing nicely.
Double click to select, triple click to select all, and drag to select.
[#]Textual #Python
=> More informations about this toot | View the thread
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
=> More informations about this toot | View the thread
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
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
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
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
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
=> More informations about this toot | View the thread
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
=> More informations about this toot | View the thread
=> This profile with reblog | Go to willmcgugan@mastodon.social account This content has been proxied by September (ba2dc).Proxy Information
text/gemini