Should I learn Python instead?

Lawrence Oluyede raims at dot.com
Sun Apr 16 20:25:48 EDT 2006


"fyleow" <fyleow at gmail.com> writes:
> I'm a student/hobbyist programmer interested in creating a web project.

I'm a student too and I've done a little Python web related stuff long ago.

>  It's nothing too complicated, I would like to get data from an RSS
> feed and store that into a database.  I want my website to get the
> information from the database and display parts of it depending on the
> criteria I set.

That's a really easy thing to do. You're lucky because thanks to Mark Pilgrim
we have one of the best RSS/Atom parsing libraries out there:
http://feedparser.org/

It's quite simple:

1 - you parse the feed
2 - you take the data
3 - you display them in your html page with one of the python frameworks
available. 

> I just finished an OO programming class in Java and I thought it would
> be a good idea to do this in C# since ASP.NET makes web applications
> easier than using Java (that's what I've heard anyway).  

It's quite right. ASP.NET is easier than JSP and J2EE stuff but Python is
better to me :)

> I thought it
> would be easy to pick up since the language syntax is very similar but
> I'm getting overwhelmed by the massive class library.  MSDN docs are
> very good and thorough but the language just seems a little unwieldy
> and too verbose.

Yeah they like in that way. A 40000+ class library and gigatons of
documents. All is verbose in their static world: documents, books, languages :(

> This is how to access an RSS feed and create an XML document to
> manipulate it.

I know the author of the RSS.NET library and I used it in the past, it can save
you some machinery. But why get a bad language with a good library instead of a
wonderful library and a very good language :) ?

> Is Python easier than C#?  

IMHO yes.

> Can
> someone show how to access an XML document on the web and have it ready
> to be manipulated for comparison?  Any other advice for a newbie?

Start with the examples on the feedparser homepage. Then choose a framework
(Turbogears? CherryPy?) and then it's a matter of _minutes_ to have a HTML page
filled with your data.

-- 
Lawrence - http://www.oluyede.org/blog
"Nothing is more dangerous than an idea
if it's the only one you have" - E. A. Chartier



More information about the Python-list mailing list