Skip to content

Commit

Permalink
Add crude progress messages
Browse files Browse the repository at this point in the history
  • Loading branch information
gvanrossum committed May 8, 2024
1 parent 5c6e15f commit 0894ef6
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions python/examples/drawing/demo.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ async def main(file_path: str | None):
history: list[str] = []

async def request_handler(request: str):
print("[Sending request...]")
history.append(request)
result: Success[schema.Drawing] | Failure = await translator.translate("\n".join(history))
if isinstance(result, Failure):
Expand All @@ -48,6 +49,7 @@ async def request_handler(request: str):

canvas.delete("all")
render_drawing(canvas, value)
print("Click in drawing to continue...")
window.mainloop()

await process_requests("~> ", file_path, request_handler)
Expand Down

0 comments on commit 0894ef6

Please sign in to comment.