-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Closed
Description
One of the most important things holding textual back right now is the ability to do python logic inside a widget.
For example, I want to make a repl in textual. As far as I know this is completely impossible without hundreds of lines of code. Where as in plain python you can do this
while True:
x = input("?: ")
print(x)It would be nice to then just take that while loop and just have a widget that can run that code. Like a container widget that just keeps that output prompt inside of the widget. For example:
def run_code():
pass
class Myapp(App):
def compose():
yield CodeContainer(func=run_code)This would make it so much easier to write things like REPLs and things that have to respond to user input.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels