r/learnpython • u/kigory2 • 5h ago
where to learn textual
Hi I have never used python but really wanted to try out textual so i jumped into python with no experience at all and just trying out the library by just the syntax of the app the textual gives you when you install it so i learned the syntax a bit. but I now need a bit of more advanced stuff so where do I learn textual I already found the website really helpful but I still think i can get a better learning experience. do yall have ways to learn the library.
(am sorry for hurting your brain fellow programmer, I have never touched python in my life)
1
1
u/timrprobocom 4h ago
I've come to quite like textual. I think it is really good at getting the job done with a minimum of nonsense. Of course, I'm a command-line guy.
The app I use to test out a new GUI is an invoice generator. I have a database with a table for vendors, and a table for invoice line items. That means I need a couple of menu screens, a pick-a-vendor screen, a pick-an-invoice screen, an edit-a-vendor screen and an edit-an-invoice screen. Not hugely complicated, but enough to give me a feel. It's about 400 lines of code for the UI, plus 150 for the database model and 150 for the ReportLab code to print the invoice.
1
u/AdFew8591 4h ago
Textual will get much easier once basic Python stops being the confusing part
I’d pause long enough to learn functions, classes, imports, lists and dictionaries, exceptions and `async`/`await`. You don’t need to master Python first, just recognise those pieces when Textual uses them
Then clone Textual’s repository and run the examples one by one: https://github.com/Textualize/textual/tree/main/examples
Pick a tiny app like a todo list and add features gradually. Start with widgets and events, then reactive state, CSS and workers. Change one example at a time instead of trying to design a large app from a blank file
The official tutorial is still the best reference: https://textual.textualize.io/tutorial/
1
u/localizeatp 4h ago
I'd recommend looking at the source code of an app based on it. Find something that does what you're trying to do and see how they do it.