Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 5 additions & 4 deletions examples/dialogs/progress_dialog.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@

import os
import time
import asyncio

from prompt_toolkit.shortcuts import progress_dialog

Expand Down Expand Up @@ -35,13 +36,13 @@ def worker(set_percentage, log_text):
time.sleep(1)


def main():
progress_dialog(
async def main():
await progress_dialog(
title="Progress dialog example",
text="As an examples, we walk through the filesystem and print all directories",
run_callback=worker,
).run()
).run_async()


if __name__ == "__main__":
main()
asyncio.run(main())