(portfile, logfile, fmt)
| 31 | yield row |
| 32 | |
| 33 | def ticker(portfile, logfile, fmt): |
| 34 | portfolio = report.read_portfolio(portfile) |
| 35 | lines = follow(logfile) |
| 36 | rows = parse_stock_data(lines) |
| 37 | rows = filter_symbols(rows, portfolio) |
| 38 | formatter = tableformat.create_formatter(fmt) |
| 39 | formatter.headings(['Name','Price','Change']) |
| 40 | for row in rows: |
| 41 | formatter.row([ row['name'], f"{row['price']:0.2f}", f"{row['change']:0.2f}"] ) |
| 42 | |
| 43 | def main(args): |
| 44 | if len(args) != 4: |
no test coverage detected