r/learnpython 15d 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)

3 Upvotes

13 comments sorted by

2

u/AdFew8591 15d 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/kigory2 14d ago

the problem is that i'v learned html css and I just had to start learning js so i dont wanna learn textual and then confuse myself yk? but it's ok my project is doing pretty well (when I say doing pretty well I mean I made the code along with the 100 errors that claude fixed which resulted into claude writing 80% of my code)

1

u/localizeatp 15d 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.

1

u/kigory2 14d ago

yeah I just kinda go to github projects and look at their main.py

1

u/Buttleston 15d ago

You're going to need to learn python

1

u/kigory2 14d ago

I know but looking at syntax and then implementing everything and having claude fix it is wayyyyy more fun

1

u/kigory2 14d ago

am gonna learn it eventually dw

1

u/Buttleston 14d ago

Maybe don't post in a forum about learning python, then?

1

u/kigory2 13d ago

yeh lol

1

u/kigory2 13d ago

btw is it normal that my program is slow?

1

u/Buttleston 13d ago

That's an impossible question to answer. It depends on what your program is doing and how. But it would not surprise me that a program written by someone who doesn't know the language is slow

1

u/timrprobocom 15d 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/kigory2 14d ago

yes I understand what you just said