(*args, **kwargs)
| 26 | """Decorator to output status info to stdout.""" |
| 27 | def decorated_fxn(fxn): |
| 28 | def call_fxn(*args, **kwargs): |
| 29 | sys.stdout.write(message + ' ... ') |
| 30 | sys.stdout.flush() |
| 31 | result = fxn(*args, **kwargs) |
| 32 | if not modal and not info: |
| 33 | print("done") |
| 34 | elif info: |
| 35 | print(info(result)) |
| 36 | else: |
| 37 | print("yes" if result else "NO") |
| 38 | return result |
| 39 | return call_fxn |
| 40 | return decorated_fxn |
| 41 |