You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

24 lines
549 B

  1. #!/usr/bin/env python
  2. # -*- coding: utf-8 -*-
  3. from __future__ import unicode_literals
  4. from __future__ import print_function
  5. import sys
  6. from time import sleep
  7. from gooey import Gooey, GooeyParser
  8. @Gooey(progress_regex=r"^progress: (\d+)%$",
  9. disable_stop_button=True)
  10. def main():
  11. parser = GooeyParser(prog="example_progress_bar_1")
  12. _ = parser.parse_args(sys.argv[1:])
  13. for i in range(100):
  14. print("progress: {}%".format(i+1))
  15. sys.stdout.flush()
  16. sleep(0.1)
  17. if __name__ == "__main__":
  18. sys.exit(main())