18 lines
667 B
Plaintext
18 lines
667 B
Plaintext
Code from Practical Python.
|
|
|
|
The "porty" directory is a Python package of code that's loaded via
|
|
import. The "print-report.py" program is a top-level script that
|
|
produces a report. Try it:
|
|
|
|
shell % python3 print-report.py portfolio.csv prices.csv txt
|
|
Name Shares Price Change
|
|
---------- ---------- ---------- ----------
|
|
AA 100 9.22 -22.98
|
|
IBM 50 106.28 15.18
|
|
CAT 150 35.46 -47.98
|
|
MSFT 200 20.89 -30.34
|
|
GE 95 13.48 -26.89
|
|
MSFT 50 20.89 -44.21
|
|
IBM 100 106.28 35.84
|
|
shell %
|