(*args, **kwargs)
| 38 | """Decorator to output status info to stdout.""" |
| 39 | def decorated_fxn(fxn): |
| 40 | def call_fxn(*args, **kwargs): |
| 41 | sys.stdout.write(message + ' ... ') |
| 42 | sys.stdout.flush() |
| 43 | result = fxn(*args, **kwargs) |
| 44 | if not modal and not info: |
| 45 | print("done") |
| 46 | elif info: |
| 47 | print(info(result)) |
| 48 | else: |
| 49 | print("yes" if result else "NO") |
| 50 | return result |
| 51 | return call_fxn |
| 52 | return decorated_fxn |
| 53 |