import urllib
import re
def get_quote(symbol):
base_url = 'http://finance.google.com/finance?q='
content = urllib.urlopen(base_url + symbol).read()
m = re.search('class="pr".*?>(.*?)<', content)
if m:
quote = m.group(1)
print symbol + " " + quote
else:
quote = 'no quote available for: ' + symbol
return quote
items = ["AAPL","GOOG","ININ","EWH","IAU"]
for n in items:
get_quote(n)
raw_input( )
Category Archives: Finance
Warren Buffet on Charlie Rose
Interview with Warren Buffet on CR:
Decide what you want from life and do it. What are your principal interests? Find something you have a passion for. Daily schedule – what do you want to do everyday? If you are going to spend your life doing something, it might as well be something with real value. Reverse engineer your life.
Giving talks – he only talks to young people. It may change their life. Older audiences just want to be entertained.
Inner scorecard – don’t worry about what others want / think.
You can afford to lose money but not reputation. Newspaper test – would you still do something if it would be published in the newspaper the next day.
Success – definition: Who would hide you – this relates to the experience of a refugee in Nazi Germany – a true friend was someone who would hide you (risk their life). As you grow older, the number of people who would agree to hide you is a referendum for you success in life.
Great story by former neighbor in Omaha – (former CEO Coca Cola) – Warren Buffet was friendly with this guys kids – suggested he put 10,000 in Warren Buffet’s fund for the kids college. Guy declined because Warren Buffet didn’t even seem get up regularly to go to work. The 10K would now be worth about 400 million now…