Python for Series 60 App: QuoteGrab

Introduction

I had 15-20 minutes to kill Wednesday night before class, so I wrote the first fully functional version of this little hack/app. It first prompts the user for a stock ticker symbol (like NOK, AAPL, YHOO). For now it expects your stock ticker symbol to be in uppercase. After the input is received, it grabs a .gif image from Yahoo! Finance, then displays the image using appuifw.content_handler. Once you are viewing the image you can zoom in, zoom out, and view the image fullscreen.

After I got the basic app working, I took a few minutes here and there over the last few days to work in some basic exception handling. I wasn’t able to catch a TypeException error thrown from content_handler, so I have it checking if content was downloaded successfully before launching content_handler.

Screenshots

Quotegrab asking for a stock to look up Initial Content_handler view of the downloaded graph Zooming in using the content_handler controls Zoomed all the way in

The first screenshot is asking for a stock ticker symbol to look up. The second is the initial zoom level when content_handler is called on the downloaded graph. The third screenshot is zoomed in a bit using the content_handler controls. The last screenshot is a fullscreen view of the graph.

Requirements

  • A Series 60 phone, 3650 or newer (tested on N-Gage and 6630)
  • Python for Series 60
  • GPRS network access (not just WAP access)

Download

quotegrab.py

Installation

Download quotegrab.py and transfer it to your phone using Bluetooth, IR, email, or other means. When you open in from your inbox, it will prompt you for installation. If you have an MMC card reader or N-Gage, you can place it in /system/apps/python/my on your MMC.

License

QuoteGrab is licensed under a BSD-style license.

TODO

While a complete running app, this 62 line Python program does one thing, once, and does it pretty well. I would like to widen the scope of this app in the future to allow you to download and view the graph of the stock over 5 days, 3 months, or any other length of time that Yahoo! Finance offers. I would also like to add the ability to download and display basic stock information such as current price, change, and other vital stats. It would also be really awesome to be able to link to Yahoo! mobile for more information.

WordPress database error: [Table './wordpress/wp_comments' is marked as crashed and last (automatic?) repair failed]
SELECT * FROM wp_comments WHERE comment_post_ID = '3632' AND comment_approved = '1' ORDER BY comment_date

7 Responses to “Python for Series 60 App: QuoteGrab”


Leave a Reply