Created
July 26, 2017 03:30
-
-
Save mlouielu/d14ac5ababc5bff035b8be05fab75569 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ cat stock.py | |
#! /usr/bin/python3 | |
import sys | |
import twstock | |
if __name__ == '__main__': | |
if len(sys.argv) == 2: | |
s = twstock.Stock(sys.argv[1]) | |
print(s.price[-5:]) | |
$ ./stock.py 2330 | |
[214.5, 215.5, 214.0, 214.5, 214.0] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment