@cmdln.option('', '--no-break', action='store_true',
                  help='Don\'t break from loop')
    def do_think(self, subcmd, opts, length=200):
        with self.bootstrapped():
            import time
            length = int(length)
            for x in textui.ProgressBar.iterate(range(length),
                                                post='Thought {total} thoughts in time {elapsed}'):
                if x == length-1 and not opts.no_break:
                    break # test that break doesn't mess up output
                time.sleep(0.1)
${cmd_name}: Progress bar example
dataset/ETHPy150Open ActiveState/applib/demo-app.py/Commands.do_think