Re.Mark

My Life As A Blog

IronPython Console App

leave a comment »

Having installed the CTP of IronPython tooling for Visual Studio, I thought I’d better try it out and write a simple app.  A Console Application seemed like a good choice – and I haven’t done much with getting data over the internet in Python, so I combined the two.  Here’s the resulting simple (and, in its current form, not especially useful) application:


import urllib2
from System import Console

print "Starting..."
data = urllib2.urlopen("http://newsrss.bbc.co.uk/rss/newsonline_uk_edition/front_page/rss.xml").read()
print data

Console.WriteLine()
Console.ReadKey()
Advertisements

Written by remark

May 28, 2010 at 4:33 pm

Posted in .NET, Python, Tools

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: