Tuesday, May 29, 2012

Even more fun: get me closing price for a sticker

If you enter a valid sticker NASDAQ code, program will print closing price.

Solution 

Because NASDAQ page is real clear XHTML, it begs for parsing by ElementTree. I'll do that next.

Sunday, May 27, 2012

What is current temperature in Honolulu?

It is obviously VERY important problem, so we need to write a program to solve it.

It's an example of reading a HTML page, parsing it, finding bit of salient info and printing it.
Obviously, for every target website you need to create customized parsing rules. We will use FindLocalWeather.com website.

Solution

Monday, May 21, 2012

Version 2, and docs

Version 2: Config may run multiple games, so file with rooms does not have to be renamed to change game. I also added simple (but non-trivial) game, "Escape from Pirate's Island" :-)

... and some documentation

Sunday, May 20, 2012

Adventure Game v 0.1

Simplest version - it has only two files (game.py and config.py), and data.py file with "rooms" to be visited.

Bad news it that blogger mangles whitespace. I need to either figure it out, or find another way to publish sources.

Problem solved: Use different, better platform! Source was posted at my new wiki: http://learnpython.wikidot.com/ (including syntax highlighting, no less!)

BTW wikidot.com is currently my favorite wikifarm - you can also get your own wiki for free.

Tomorrow: add more rooms to get more interesting game.

Sunday, April 29, 2012

I know what I am going to blog about: Python!

I will write about implementing my old idea:
Text adventure game.
It will be a good match for my another website LearnPython wiki . - Python learners can see how project grows. I may even implement it as Django app, and even as AJAX app. We will see how far I will go.

And why Python? XKCD has the answer: