Now we can define main(). Because of the high level of abstraction involved in this program, main() is quite small. The code is as follows:
def main():That is it for now. We define output in terms of the function formBody and then print the results. We could simply pass the function call to print, but I have kept them separate for simplicity's sake.
output = formBody(feedname)
print output
Finally, the program is not finished until we call the main() function. To do this, we use the following code:
if __name__ == "__main__":
main()
Now, you can point your browser to this file on your web server and enjoy your own, personalised and Python-powered RSS Reader. As you do, keep in mind that all is not over for this project. In the future, we will be adding error checking, Unicode handling, and a few other essentials as well as features like images and computerised feed addition. So stay tuned.
Other tutorials in this series:
Part 1 | 2 | 3 | 4 | 5
Get the Code!
