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.

23 lines
516 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. def main():
  10. parser = GooeyParser(prog="example_progress_bar_1")
  11. _ = parser.parse_args(sys.argv[1:])
  12. for i in range(100):
  13. print("progress: {}%".format(i+1))
  14. sys.stdout.flush()
  15. sleep(0.1)
  16. if __name__ == "__main__":
  17. sys.exit(main())