1.To get "hi username" as output on giving greet command.
2.To get stock value of GOOG on giving stockGOOG command.
from cmd2 import Cmd
from getpass import getuser
import requests
import sys
__version__ = '0.1'
""" The main Application class
"""
link = requests.get("http://download.finance.yahoo.com/d/quotes.csv?s=GOOG&f=l1")
stockvalue=r.text
print stockvalue
$python psh.py
The link of actual file is https://github.com/resham/summer-training-hometask/blob/master/psh.py