<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Morten&#039;s Blog</title>
	<atom:link href="http://www.mortenblog.net/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.mortenblog.net</link>
	<description>The random output of Morten André Steinsland</description>
	<lastBuildDate>Thu, 28 Jan 2010 04:00:52 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Frightened Rabbit &#8211; Head Rolls Off</title>
		<link>http://www.mortenblog.net/2010/01/28/frightened-rabbit-head-rolls-off/</link>
		<comments>http://www.mortenblog.net/2010/01/28/frightened-rabbit-head-rolls-off/#comments</comments>
		<pubDate>Thu, 28 Jan 2010 03:42:46 +0000</pubDate>
		<dc:creator>Morten André</dc:creator>
				<category><![CDATA[Faith & Religion]]></category>
		<category><![CDATA[Music, Video & TV]]></category>
		<category><![CDATA[Christian]]></category>
		<category><![CDATA[Media]]></category>
		<category><![CDATA[Movie]]></category>
		<category><![CDATA[Music]]></category>
		<category><![CDATA[Video]]></category>

		<guid isPermaLink="false">http://www.mortenblog.net/?p=595</guid>
		<description><![CDATA[Great tune by Frightened Rabbit from Scotland. You can find more from them on Spotify.

<object	type="application/x-shockwave-flash"
			data="http://www.youtube.com/v/nBcbDS5AGnk"
			width="700"
			height="557">
	<param name="movie" value="http://www.youtube.com/v/nBcbDS5AGnk" />
	<param name=wmode" value="transparent" />
</object>
]]></description>
			<content:encoded><![CDATA[<p>Great tune by <a href="http://www.myspace.com/frightenedrabbit">Frightened Rabbit</a> from Scotland. You can find <a href="http://open.spotify.com/artist/6fVcDUckTwxqg56qNsEvUr">more</a> from them on Spotify.<br />
<code>
<object	type="application/x-shockwave-flash"
			data="http://www.youtube.com/v/nBcbDS5AGnk"
			width="700"
			height="557">
	<param name="movie" value="http://www.youtube.com/v/nBcbDS5AGnk" />
	<param name=wmode" value="transparent" />
</object></code></p>
]]></content:encoded>
			<wfw:commentRss>http://www.mortenblog.net/2010/01/28/frightened-rabbit-head-rolls-off/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>The Tragically Hip &#8211; The Darkest One</title>
		<link>http://www.mortenblog.net/2010/01/28/the-tragically-hip-the-darkest-one/</link>
		<comments>http://www.mortenblog.net/2010/01/28/the-tragically-hip-the-darkest-one/#comments</comments>
		<pubDate>Thu, 28 Jan 2010 01:12:25 +0000</pubDate>
		<dc:creator>Morten André</dc:creator>
				<category><![CDATA[Music, Video & TV]]></category>
		<category><![CDATA[Media]]></category>
		<category><![CDATA[Movie]]></category>
		<category><![CDATA[Music]]></category>
		<category><![CDATA[Video]]></category>

		<guid isPermaLink="false">http://www.mortenblog.net/?p=586</guid>
		<description><![CDATA[Another excellent tune from The Tragically Hip. This one starring the golden trio from The Trailer Park Boys. These guys almost makes one proud of only living 3.600 kilometers from the border of Canada.

<object	type="application/x-shockwave-flash"
			data="http://www.youtube.com/v/AJZhc3HAwpc"
			width="700"
			height="557">
	<param name="movie" value="http://www.youtube.com/v/AJZhc3HAwpc" />
	<param name=wmode" value="transparent" />
</object>
]]></description>
			<content:encoded><![CDATA[<p>Another excellent tune from The Tragically Hip. This one starring the golden trio from The Trailer Park Boys. These guys almost makes one proud of only living 3.600 kilometers from the border of Canada.<br />
<code>
<object	type="application/x-shockwave-flash"
			data="http://www.youtube.com/v/AJZhc3HAwpc"
			width="700"
			height="557">
	<param name="movie" value="http://www.youtube.com/v/AJZhc3HAwpc" />
	<param name=wmode" value="transparent" />
</object></code></p>
]]></content:encoded>
			<wfw:commentRss>http://www.mortenblog.net/2010/01/28/the-tragically-hip-the-darkest-one/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>The Tragically Hip &#8211; It&#8217;s a good life if you don&#8217;t weaken</title>
		<link>http://www.mortenblog.net/2010/01/14/the-tragically-hip-its-a-good-life-if-you-dont-weaken/</link>
		<comments>http://www.mortenblog.net/2010/01/14/the-tragically-hip-its-a-good-life-if-you-dont-weaken/#comments</comments>
		<pubDate>Thu, 14 Jan 2010 04:14:49 +0000</pubDate>
		<dc:creator>Morten André</dc:creator>
				<category><![CDATA[Music, Video & TV]]></category>
		<category><![CDATA[Media]]></category>
		<category><![CDATA[Music]]></category>
		<category><![CDATA[Video]]></category>

		<guid isPermaLink="false">http://www.mortenblog.net/?p=578</guid>
		<description><![CDATA[
<object	type="application/x-shockwave-flash"
			data="http://www.youtube.com/v/85k4RxqRyv8"
			width="700"
			height="557">
	<param name="movie" value="http://www.youtube.com/v/85k4RxqRyv8" />
	<param name=wmode" value="transparent" />
</object>
]]></description>
			<content:encoded><![CDATA[<p><code>
<object	type="application/x-shockwave-flash"
			data="http://www.youtube.com/v/85k4RxqRyv8"
			width="700"
			height="557">
	<param name="movie" value="http://www.youtube.com/v/85k4RxqRyv8" />
	<param name=wmode" value="transparent" />
</object></code></p>
]]></content:encoded>
			<wfw:commentRss>http://www.mortenblog.net/2010/01/14/the-tragically-hip-its-a-good-life-if-you-dont-weaken/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>The Tragically Hip &#8211; Bobcaygeon</title>
		<link>http://www.mortenblog.net/2010/01/14/the-tragically-hip-bobcaygeon/</link>
		<comments>http://www.mortenblog.net/2010/01/14/the-tragically-hip-bobcaygeon/#comments</comments>
		<pubDate>Thu, 14 Jan 2010 03:53:51 +0000</pubDate>
		<dc:creator>Morten André</dc:creator>
				<category><![CDATA[Music, Video & TV]]></category>
		<category><![CDATA[Media]]></category>
		<category><![CDATA[Music]]></category>
		<category><![CDATA[Video]]></category>

		<guid isPermaLink="false">http://www.mortenblog.net/?p=558</guid>
		<description><![CDATA[I first heard The Tragically Hip in The Trailer Park Boys series. I hope they get (more) on Spotify soon, one song is just not enough! But releasing more on youtube is a start though.
<object	type="application/x-shockwave-flash"
			data="http://www.youtube.com/v/o6QDjDPRF5c"
			width="700"
			height="557">
	<param name="movie" value="http://www.youtube.com/v/o6QDjDPRF5c" />
	<param name=wmode" value="transparent" />
</object>
]]></description>
			<content:encoded><![CDATA[<p>I first heard <a href="http://www.thehip.com">The Tragically Hip</a> in The <a href="http://www.trailerparkboys.com">Trailer Park Boys</a> series. I hope they get (more) on Spotify soon, one song is just not enough! But releasing more on youtube is a start though.<code>
<object	type="application/x-shockwave-flash"
			data="http://www.youtube.com/v/o6QDjDPRF5c"
			width="700"
			height="557">
	<param name="movie" value="http://www.youtube.com/v/o6QDjDPRF5c" />
	<param name=wmode" value="transparent" />
</object></code></p>
]]></content:encoded>
			<wfw:commentRss>http://www.mortenblog.net/2010/01/14/the-tragically-hip-bobcaygeon/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Sometimes one needs a reminder</title>
		<link>http://www.mortenblog.net/2009/11/10/sometimes-one-needs-a-reminder/</link>
		<comments>http://www.mortenblog.net/2009/11/10/sometimes-one-needs-a-reminder/#comments</comments>
		<pubDate>Tue, 10 Nov 2009 03:43:38 +0000</pubDate>
		<dc:creator>Morten André</dc:creator>
				<category><![CDATA[Faith & Religion]]></category>
		<category><![CDATA[Music, Video & TV]]></category>
		<category><![CDATA[Christian]]></category>
		<category><![CDATA[Media]]></category>
		<category><![CDATA[Movie]]></category>
		<category><![CDATA[Music]]></category>
		<category><![CDATA[Video]]></category>

		<guid isPermaLink="false">http://www.mortenblog.net/?p=550</guid>
		<description><![CDATA[Thanks to IgniterMedia for this great compilation. See here for a text version.

<object	type="application/x-shockwave-flash"
			data="http://www.youtube.com/v/upGCMl_b0n4"
			width="700"
			height="557">
	<param name="movie" value="http://www.youtube.com/v/upGCMl_b0n4" />
	<param name=wmode" value="transparent" />
</object>
]]></description>
			<content:encoded><![CDATA[<p>Thanks to <a href="http://www.youtube.com/user/IgniterMedia">IgniterMedia</a> for this great compilation. See <a href="http://www.mortenblog.net/2007/12/13/my-king-jesus/">here</a> for a text version.<br />
<code>
<object	type="application/x-shockwave-flash"
			data="http://www.youtube.com/v/upGCMl_b0n4"
			width="700"
			height="557">
	<param name="movie" value="http://www.youtube.com/v/upGCMl_b0n4" />
	<param name=wmode" value="transparent" />
</object></code></p>
]]></content:encoded>
			<wfw:commentRss>http://www.mortenblog.net/2009/11/10/sometimes-one-needs-a-reminder/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Highscore module for Python using SQLite</title>
		<link>http://www.mortenblog.net/2009/11/01/highscore-module-for-python-using-sqlite/</link>
		<comments>http://www.mortenblog.net/2009/11/01/highscore-module-for-python-using-sqlite/#comments</comments>
		<pubDate>Sun, 01 Nov 2009 09:01:53 +0000</pubDate>
		<dc:creator>Morten André</dc:creator>
				<category><![CDATA[Python]]></category>
		<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[Gaming]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[Software]]></category>
		<category><![CDATA[Tutorial]]></category>

		<guid isPermaLink="false">http://www.mortenblog.net/?p=542</guid>
		<description><![CDATA[This is a simple Python module that stores highscores in an SQLite database in the same folder as the module. It's far from watertight so tweak it according to your needs. Read source for examples.

# -*- coding: utf-8 -*-

# @name: highscore.py
# @summary: This is a simple Python module using SQLite to store and retrieve highscores
# [...]]]></description>
			<content:encoded><![CDATA[<p>This is a simple Python module that stores highscores in an SQLite database in the same folder as the module. It's far from watertight so tweak it according to your needs. Read source for examples.</p>
<p><span id="more-542"></span></p>
<pre class="prettyprint"># -*- coding: utf-8 -*-

# @name: highscore.py
# @summary: This is a simple Python module using SQLite to store and retrieve highscores
# @author: Morten André Steinsland <morten.a.steinsland@gmail.com>
# @contact: www.mortenblog.net 

# @license: GNU Lesser General Public License
# @copyright: Copyright 2009 Morten André Steinsland
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Lesser General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU Lesser General Public License for more details.
#
# You should have received a copy of the GNU Lesser General Public License
# along with this program.  If not, see http://www.gnu.org/licenses/

# @version: 1.3
# @since: 25.10.2009
# @status: Working, Not perfect

# @note: Examples
# DATABASE = HighScoreFile('highscores.dat')
# DATABASE.addscore(3543,'PlayerName')
# DATABASE.gethighestscore()
# DATABASE.getlowestscore()
# DATABASE.gettopscores(10)

import sqlite3
from os import path

class HighScoreFile:
    def __init__(self, filename):
        """Does the connecting and construction if database does not already exist"""
        self.databasename = filename

        if path.exists(self.databasename) and path.isfile(self.databasename):
            # database already exist, go ahead and connect
            self.database = sqlite3.connect(self.databasename)
            self.dbcursor = self.database.cursor()

        else:
            # we need to construct the database for the first time
            # @todo: create some default data(?)
            self.database = sqlite3.connect(self.databasename)
            self.dbcursor = self.database.cursor()
            sqlstatement = u"""CREATE TABLE highscores(score INTEGER, playername TEXT);"""
            self.dbcursor.execute(sqlstatement)
            self.database.commit()

    def getlowestscore(self):
        """Returns the lowest ranking player and his score"""
        sqlstatement = u"""SELECT score,playername FROM highscores WHERE score = (SELECT min(score) FROM highscores) LIMIT 1;"""
        self.dbcursor.execute(sqlstatement)

        for row in self.dbcursor:
            return (int(row[0]),unicode(str(row[1])))

    def gethighestscore(self):
        """Returns the highest ranking player and his score"""
        sqlstatement = u"""SELECT score,playername FROM highscores WHERE score = (SELECT max(score) FROM highscores) LIMIT 1;"""
        self.dbcursor.execute(sqlstatement)

        for row in self.dbcursor:
            return (int(row[0]),unicode(str(row[1])))

    def gettopscores(self,scores):
        """Returns top X scores"""
        # @todo: handle scores variable being bigger than number of rows(?)
        sqlstatement = u"""SELECT score,playername FROM highscores ORDER BY score DESC LIMIT %s;""" % scores
        self.dbcursor.execute(sqlstatement)
        toplist = []

        for row in self.dbcursor:
            toplist.append((int(row[0]),unicode(row[1])))

        toplist.sort(key=lambda x:x[1].lower()) #sort by name
        toplist.sort(key=lambda x:x[0], reverse=True) #sort by score

        return toplist

    def addscore(self,playername,playerscore):
        """Add the players name and score to the database"""
        sqlstatement = u"""INSERT INTO highscores(score,playername) values (%s,'%s');""" % (int(playerscore), str(playername))
        self.dbcursor.execute(sqlstatement)
        self.maintenance()

    def maintenance(self):
        """Sorts the highscorelist , removes duplicates and commits changes"""
        keeptopscores = 10 #keep this many top scores
        sqlstatement = u"""SELECT DISTINCT score, playername FROM highscores ORDER BY score DESC LIMIT %s;""" % (keeptopscores)
        self.dbcursor.execute(sqlstatement)
        highscores = []

        for row in self.dbcursor:
            highscores.append((int(row[0]),unicode(row[1])))

        highscores.sort(key=lambda x:x[1].lower()) #sort by name
        highscores.sort(key=lambda x:x[0],reverse=True) #sort by score

        ###DELETES THE CONTENTS OF THE highscores TABLE###
        sqlstatement = u"""DELETE FROM highscores WHERE rowid > -1;"""
        self.dbcursor.execute(sqlstatement)
        #########################################################

        del highscores[keeptopscores:] #remove unwanted scores

        #insert sorted data into score table
        for each in highscores:
            sqlstatement = u"""INSERT INTO highscores(score,playername) values (%s,'%s');""" % (int(each[0]),str(each[1]))
            self.dbcursor.execute(sqlstatement)

        #finish up
        del highscores
        self.database.commit()
</pre>
]]></content:encoded>
			<wfw:commentRss>http://www.mortenblog.net/2009/11/01/highscore-module-for-python-using-sqlite/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Role-playing music, a different approach.</title>
		<link>http://www.mortenblog.net/2009/09/24/role-playing-music/</link>
		<comments>http://www.mortenblog.net/2009/09/24/role-playing-music/#comments</comments>
		<pubDate>Thu, 24 Sep 2009 00:01:53 +0000</pubDate>
		<dc:creator>Morten André</dc:creator>
				<category><![CDATA[Music, Video & TV]]></category>
		<category><![CDATA[Game]]></category>
		<category><![CDATA[Gaming]]></category>
		<category><![CDATA[Music]]></category>

		<guid isPermaLink="false">http://www.mortenblog.net/?p=526</guid>
		<description><![CDATA[I've been playing Guild Wars quite a lot this summer. And although great as it is, the Guild Wars soundtrack can get a bit old at times, so I went looking for some good role-playing background music on Google. I found some lists of recommendations here and there, but they contained mostly death metal, which [...]]]></description>
			<content:encoded><![CDATA[<p>I've been playing <a title="Guild Wars official homepage" href="http://www.guildwars.com" target="_blank">Guild Wars</a> quite a lot this summer. And although great as it is, the Guild Wars soundtrack can get a bit old at times, so I went looking for some good role-playing background music on Google. I found some lists of recommendations here and there, but they contained mostly death metal, which is utter garbarge. So I started compiling a <a href="http://www.spotify.com" target="_blank">Spotify</a> list of what is, in my opinion, good background music for RPG.</p>
<p>Get the list <a title="Morten's RPG music compilation" href="http://open.spotify.com/user/mastein/playlist/0qEcO8iEnFVlVPrYsLvRG9" target="_blank">here</a>. It includes among others; Vangelis, Jesper Kyd, Danny Elfman, Jerry Goldsmith and Philip Glass.</p>
<p>The list will be evolving as i come across good albums or tunes. If you know an album or song that would fit amongst the others i would appreciate feedback. I apologize beforehand if any tunes are unsuited for RPG, as i've grabbed whole albums and have not listened to the entire collection.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.mortenblog.net/2009/09/24/role-playing-music/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Spammer-Scammer, random e-mail generator with Python.</title>
		<link>http://www.mortenblog.net/2009/05/26/spammer-scammer-python-random-email-generator/</link>
		<comments>http://www.mortenblog.net/2009/05/26/spammer-scammer-python-random-email-generator/#comments</comments>
		<pubDate>Mon, 25 May 2009 23:23:24 +0000</pubDate>
		<dc:creator>Morten André</dc:creator>
				<category><![CDATA[Funny Stuff]]></category>
		<category><![CDATA[Python]]></category>
		<category><![CDATA[Funny]]></category>
		<category><![CDATA[Hack]]></category>
		<category><![CDATA[Internet]]></category>
		<category><![CDATA[Programming]]></category>

		<guid isPermaLink="false">http://www.mortenblog.net/?p=472</guid>
		<description><![CDATA[Lately I've received a number of messages from bots using other people's hacked MSN accounts. The link they were pushing was basically an email confirmation link, clicking it would have told them that my e-mail address was valid, and surely landed me in some spammer's e-mail lists. So instead i decided to try and mess [...]]]></description>
			<content:encoded><![CDATA[<div id="attachment_503" class="wp-caption alignright" style="width: 122px"><img class="size-full wp-image-503" title="spam" src="http://www.mortenblog.net/wp-content/uploads/2009/05/spam.png" alt="Spam in a can" width="112" height="112" /><p class="wp-caption-text">Spam in a can</p></div>
<p>Lately I've received a number of messages from bots using other people's hacked <acronym title="Microsoft Messenger">MSN</acronym> accounts. The link they were pushing was basically an email confirmation link, clicking it would have told them that my e-mail address was valid, and surely landed me in some spammer's e-mail lists. So instead i decided to try and mess around a little, and thus this little <a href="http://www.python.org/">Python</a> program was written.</p>
<p>It generates random fake e-mails, from three text lists, and sends them to the spammer using their own validator link, trough the <a href="http://www.torproject.org">Tor</a> proxy network; making it harder to block  or locate you.</p>
<p>Download it <a href="http://www.mortenblog.net/wp-content/uploads/2009/05/spammerscammer.zip">here</a> . Use it at your own risk or don't use it at all, read the disclaimer in the source. Feel free to do whatever the heck you want with it, just don't come back crying if you make a booboo.<br />
<br><span id="more-472"></span><br />
Below is the source, name lists excluded (included in the zip).<br></p>
<pre class="prettyprint">#!/usr/bin/env python
# -*- coding: utf-8 -*-

# SpammerScammer.py
# Copyright (c)2009 Morten André Steinsland

# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDER AND CONTRIBUTORS "AS IS"
# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
# THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
# PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS
# BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY,
# OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
# CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
# POSSIBILITY OF SUCH DAMAGE. USE THE SOFTWARE AT YOUR OWN RISK!

import random , time , urllib

preURL = "http://www.wespamandscam.com/?youremail=" #First part of the URL
proxy = {'http': 'http://127.0.0.1:8118'} #Local Tor proxy address

##[ Open the text lists ]##
FileFirstNames = open('first_names.txt', 'r')
FileLastNames = open('last_names.txt', 'r')
FileDomains = open('domain_names.txt', 'r')

##[ Generate lists ]##
FirstNames = FileFirstNames.readlines()
LastNames = FileLastNames.readlines()
DomainNames = FileDomains.readlines()
Separators = ['_' , '.' , '-' , '']

##[ Set the User-Agent ]##
class UserAgentHack(urllib.FancyURLopener):
    version = "Mozilla/5.0 (Windows; U; Windows NT 5.1; it; rv:1.8.1.11) Gecko/20071127 Firefox/2.0.0.11"
urllib._urlopener = UserAgentHack()

##[ Functions ]##
def GenerateMail(firstnames, separators, lastnames, domains):
    """This returns a random email address generated from four lists"""

    RandomFirstName = firstnames[random.randint(0 , len(firstnames)-1)].rstrip('\n').lower()
    RandomSeparator = separators[random.randint(0 , len(separators)-1)]
    RandomLastName = lastnames[random.randint(0 , len(lastnames)-1)].rstrip('\n').lower()
    RandomDomain = domains[random.randint(0 , len(domains)-1)].rstrip('\n').lower()

    return RandomFirstName + RandomSeparator + RandomLastName + '@' + RandomDomain

##[ Main ]##
print "Choosing among " + str(len(FirstNames)) + " first names, " + str(len(Separators)) + ' separators, ' + str(len(LastNames)) + " surnames and " + str(len(DomainNames)) + " domains."

print str(len(FirstNames) * len(Separators) * len(LastNames) * len(DomainNames)) + ' possible combinations.'

Number = 0
while True:

    URL = preURL + GenerateMail(FirstNames, Separators, LastNames, DomainNames)
    urllib.urlopen(URL , proxies=proxy)
    print str(Number) + ' ' +  URL
    urllib.urlcleanup()
    time.sleep(1)
    Number = Number + 1</pre>
]]></content:encoded>
			<wfw:commentRss>http://www.mortenblog.net/2009/05/26/spammer-scammer-python-random-email-generator/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Ripping music from Spotify with Voice Changer 6</title>
		<link>http://www.mortenblog.net/2009/02/27/ripping-music-from-spotify-with-voice-changer-6/</link>
		<comments>http://www.mortenblog.net/2009/02/27/ripping-music-from-spotify-with-voice-changer-6/#comments</comments>
		<pubDate>Fri, 27 Feb 2009 00:09:16 +0000</pubDate>
		<dc:creator>Morten André</dc:creator>
				<category><![CDATA[Music, Video & TV]]></category>
		<category><![CDATA[Tips'n'Tricks]]></category>
		<category><![CDATA[Internet]]></category>
		<category><![CDATA[Music]]></category>
		<category><![CDATA[Software]]></category>

		<guid isPermaLink="false">http://www.mortenblog.net/?p=432</guid>
		<description><![CDATA[This is a pretty easy way to automatically rip music from Spotify using AV Voice Changer 6. DO NOT DO THIS, YOU WILL BE IN VIOLATION OF THE SPOTIFY END USER LICENSE AGREEMENT!

What you would need:

A Spotify account and the Spotify client
Audio4fun's AV Voice Changer Software Diamond 6

Voice Changer is intended to be just that, [...]]]></description>
			<content:encoded><![CDATA[<div id="attachment_438" class="wp-caption alignright" style="width: 161px"><img class="size-medium wp-image-438" title="spotify logo" src="http://www.mortenblog.net/wp-content/uploads/2009/02/spotify_logo-300x171.jpg" alt="Spotify Logo" width="151" height="86" /><p class="wp-caption-text">Spotify logo</p></div>
<p>This is a pretty easy way to automatically rip music from <a href="http://spotify.com/" target="_blank">Spotify</a> using <a href="http://www.audio4fun.com/voice-over.htm" target="_blank">AV Voice Changer 6</a>. <strong><span style="text-decoration:blink">DO NOT DO THIS, YOU WILL BE IN VIOLATION OF THE SPOTIFY END USER LICENSE AGREEMENT!</span><br />
</strong></p>
<p>What you would need:</p>
<ul>
<li>A Spotify account and the Spotify client</li>
<li>Audio4fun's AV Voice Changer Software Diamond 6</li>
</ul>
<p>Voice Changer is intended to be just that, a voice changer. It can make you sound like a cartoon mosquito or one of those creepy kidnappers from the movies, in real time. But the feature we would want is Voice Changer's sound recording function which would allow us to record the tunes streamed from Spotify into separate files with the compression method of our choosing.</p>
<p>Start up the Spotify client and log in. Find a couple of tunes you like and put them in a playlist. Check that the music plays ok and without lag. Disconnect your microphone, and make sure there won't be anything else making sound on your computer. Start up Voice Changer and verify that the audio from Spotify registers in Voice Changer's volume meter. We don't want our tunes to sound like smurf songs, so just turn off all the effects by clicking the <strong>On/Off button</strong>.</p>
<div id="attachment_441" class="wp-caption aligncenter" style="width: 310px"><a href="http://www.mortenblog.net/wp-content/uploads/2009/02/voice_changer_ui1.jpg"><img class="size-medium wp-image-441" title="voice changer ui" src="http://www.mortenblog.net/wp-content/uploads/2009/02/voice_changer_ui1-300x207.jpg" alt="Voice Changer interface" width="300" height="207" /></a><p class="wp-caption-text">Voice Changer interface</p></div>
<p>Stop the music from playing for a moment and click Voice Changer's Recorder button. A small window should open up, looking something like this:</p>
<div id="attachment_453" class="wp-caption aligncenter" style="width: 310px"><a href="http://www.mortenblog.net/wp-content/uploads/2009/02/voice_changer_recorder.jpg"><img class="size-medium wp-image-453" title="voice changer recorder" src="http://www.mortenblog.net/wp-content/uploads/2009/02/voice_changer_recorder-300x165.jpg" alt="Voice Changer's recorder window" width="300" height="165" /></a><p class="wp-caption-text">Voice Changer&#39;s recorder window</p></div>
<p><span id="more-432"></span>We are going to make Voice Changer automatically record sound coming from Spotify. Click the Recorder Settings button in the upper right corner. Select your output folder, file naming, and the desired Encoder configuration. Then, go to the Autostart tab and add the Spotify executable to the list of programs Voice Changer should automaticly record from. When that's all done, click OK.</p>
<div id="attachment_454" class="wp-caption aligncenter" style="width: 310px"><a href="http://www.mortenblog.net/wp-content/uploads/2009/02/voice_changer_recorder_settings.jpg"><img class="size-medium wp-image-454" title="voice changer recorder settings" src="http://www.mortenblog.net/wp-content/uploads/2009/02/voice_changer_recorder_settings-300x264.jpg" alt="Recorder autostart settings" width="300" height="264" /></a><p class="wp-caption-text">Recorder autostart settings</p></div>
<p>Leave the Recorder window open. Voice Changer will now begin recording the moment Spotify makes a peep. And not only that, the songs would be seperated and encoded into individual files automatically.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.mortenblog.net/2009/02/27/ripping-music-from-spotify-with-voice-changer-6/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>Creating SNES game videos with ZSnes and MEncoder</title>
		<link>http://www.mortenblog.net/2009/02/23/recording-snes-game-videoes-with-zsnes-and-mencoder/</link>
		<comments>http://www.mortenblog.net/2009/02/23/recording-snes-game-videoes-with-zsnes-and-mencoder/#comments</comments>
		<pubDate>Mon, 23 Feb 2009 13:08:56 +0000</pubDate>
		<dc:creator>Morten André</dc:creator>
				<category><![CDATA[Music, Video & TV]]></category>
		<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[Gaming]]></category>
		<category><![CDATA[Retro]]></category>
		<category><![CDATA[Software]]></category>
		<category><![CDATA[Tutorial]]></category>
		<category><![CDATA[Video]]></category>

		<guid isPermaLink="false">http://www.mortenblog.net/?p=364</guid>
		<description><![CDATA[Ever wanted to record your Super Mario skills on the Super Nintendo console, without the console? Don't worry, most of todays computers are powerful enough to pretend being, or emulate, a console machine. Most likely so is your's.  And you're in luck, Super Nintendo is one of, if not the best, emulated console system there [...]]]></description>
			<content:encoded><![CDATA[<p>Ever wanted to record your Super Mario skills on the Super Nintendo console, without the console? Don't worry, most of todays computers are powerful enough to pretend being, or emulate, a console machine. Most likely so is your's.  And you're in luck, Super Nintendo is one of, if not the best, emulated console system there is. All you basically need is an emulator, the piece of software that magically turns your PC into a good ol' console; and the ROM file of your favorite game. The game ROM's are in most cases copyrighted, so i can't nor won't supply you with those. Make sure you own the game cartridge, or else you might find yourself in violation of copyright laws.</p>
<p>The things you will need:</p>
<ul>
<li>A Super Nintendo emulator for Windows called <a title="The ZSnes homepage" href="http://www.zsnes.com" target="_blank">ZSnes</a>, coded by <em>zsKnight</em> and <em>_Demo_ </em><strong>*</strong><em><br />
</em></li>
<li>The <a href="http://en.wikipedia.org/wiki/ROM_image" target="_blank">ROM image</a> from your favorite SNES game. Look around, they are not that hard to find.</li>
<li><a title="The MEncoder homepage" href="http://sourceforge.net/project/showfiles.php?group_id=205275&amp;package_id=248631&amp;release_id=551431" target="_blank">MEncoder</a> by <em>Gianluigi Tiesi</em></li>
</ul>
<p><em>* At the time of writing, ZSnes has reached version 1.51<br />
</em></p>
<p>Copy your ROM image(s) to any folder. Preferably one that doesn't require you to click trough too many folders to get to it.</p>
<p>Installing the software is pretty straightforward, just extract the two archives, each into their own folders. It might work having ZSnes and MEncoder in the same folder, but i haven't tried it. Also, i think that's a little messy. You are going to add the MEncoder location to window's PATH environment variable instead, so remember the location where you extracted it. Follow the instructions below as the procedure differs a little depending on what version of Windows you are using.</p>
<div id="attachment_391" class="wp-caption alignright" style="width: 291px"><img class="size-full wp-image-391" title="System Path Variable" src="http://www.mortenblog.net/wp-content/uploads/2009/02/edit_system_path_variable.jpg" alt="System Path Variable" width="281" height="118" /><p class="wp-caption-text">Edit your Path environment variable</p></div>
<p>For <em>Windows Vista</em> you can go to the <em>Control panel</em> and click on the <em>System</em> icon, select <em>Advanced System Settings</em> in the left menu and then the <em>"Environment variables" button</em>. Then, in the list under <em>"System Variables"</em>, look for <em>Path</em> (might be lower- or uppercase). When you have found it, edit it and add the location of the folder where the <em>MEncoder executable</em> file is located. Remember to add the semicolon that is needed to separate the various folders listed in the <em>Path</em> string. Click <em>OK</em>, and your done.</p>
<p>(<a title="How to set the path environment variable in Windows 2000 or Windows XP" href="http://www.computerhope.com/issues/ch000549.htm" target="_blank">How to set the path in Windows 2000 / Windows XP</a>)</p>
<p>When that's all done, let's start up ZSnes and configure it a little. The main things to check out is the Screen Resolution, Filters and Input</p>
<p>Choose your optimal screen preferences under "Video" in the Config menu. I have a widescreen and wanted ZSnes to fill the screen completely, so i made a custom screen setting it to <em>1360x768</em> with the <em>DS F</em> option (check the legend for description). Choose the <em>Filter</em> that you feel gives the best result. Configure your <em>Input,</em> and let's load up a game already! Click <em>GAME</em> in the top menu, and select <em>LOAD</em>. Then browse to the folder where you copied or extracted the ROM file(s), select the game you want to play and click the <em>LOAD</em> button. If the game runs, great! if it doesn't, seek help!<span id="more-364"></span></p>
<p>Let us record a short game session that we will later use to generate the movie. Press <em>ESC</em>, so that the game pauses and the top menu pops out. Under the <em>MISC</em> button, you should select <em>MOVIE OPT</em>. This will bring up the control panel for the ZSnes movie recording feature. There are two tabs in the window, but let's leave it on <em>CONTROLS</em> for now.<em><br />
</em></p>
<div id="attachment_397" class="wp-caption aligncenter" style="width: 310px"><a href="http://www.mortenblog.net/wp-content/uploads/2009/02/zsnes_movie_recording_control_panel.jpg"><img class="size-medium wp-image-397" title="zsnes movie recording control panel" src="http://www.mortenblog.net/wp-content/uploads/2009/02/zsnes_movie_recording_control_panel-300x168.jpg" alt="Movie Recording Control Panel" width="300" height="168" /></a><p class="wp-caption-text">ZSnes&#39; movie recording control panel</p></div>
<p>Select one of the movie slots, and remember which one you picked. Also activate the <em>RECORD FROM:RESET</em> radio button. Finally, click <em>RECORD</em> and start playing! When your done playing, hit <em>ESC</em> again, and go to the control panel and click <em>STOP</em>. You could go straight to the <em>DUMPING</em> tab and encode the video right away, but the output would be of rather poor quality. Let's exit ZSnes for a moment, to configure the way MEncoder will create our movie into a format that can be played in a normal video file player, or uploaded to <a title="Share your recordings on YouTube" href="http://www.youtube.com/" target="_blank">YouTube</a>.</p>
<p>Open up the file called <strong>zmovie.cfg</strong> (located in the same folder as the ZSnes executable) in a text editor. I'm no expert on digital video, i honestly don't have a clue, so check out the <a title="MEncoder Documentation" href="http://www.mplayerhq.hu/DOCS/HTML/en/mencoder.html" target="_blank">MEncoder documentation</a> on how to optimize your settings for your needs. But these are the changes i made:</p>
<p>Change:</p>
<pre class="prettyprint">md_xvid="-ovc xvid -xvidencopts fixed_quant=2"</pre>
<p>Into:</p>
<pre class="prettyprint">md_xvid="-ovc xvid -xvidencopts bitrate=4200:vhq=1:max_bframes=2:quant_type=h263:chroma_me:me_quality=6"</pre>
<p>Change:</p>
<pre class="prettyprint">md_command="$md_prog $md_other $md_no_sound $md_raw $md_vcodec -o $md_file -"</pre>
<p>Into:</p>
<pre class="prettyprint">md_command="$md_prog $md_other $md_no_sound $md_raw $md_vcodec -vf scale=1360:768 -sws 2 -o $md_file -"</pre>
<p>Change the screen resolution (1360:768) according to your ZSnes settings. Save and close <strong>zmovie.cfg</strong>. Now start ZSnes again, and load the same ROM you used when recording. Press <em>ESC</em>, and go to the movie recorder control panel. But this time you will go to the <em>DUMPING</em> tab.</p>
<div id="attachment_407" class="wp-caption aligncenter" style="width: 310px"><a href="http://www.mortenblog.net/wp-content/uploads/2009/02/zsnes_movie_dumping_settings.jpg"><img class="size-medium wp-image-407" title="zsnes movie dumping settings" src="http://www.mortenblog.net/wp-content/uploads/2009/02/zsnes_movie_dumping_settings-300x169.jpg" alt="ZSnes movie dumping settings" width="300" height="169" /></a><p class="wp-caption-text">ZSnes movie dumping settings</p></div>
<p>Select the movie slot you chose when you recorded. Select the <em>XVID LOSSLESS</em> option, and <em>DUMP AUDIO</em>. This will output the sound and video seperately, leaving the sound uncompressed. You can mix the two together later using your favorite video editor. (If you want to compress the sound using ZSnes, you are going to need the <em><a href="http://lame.sourceforge.net" target="_blank">Lame</a></em> mp3 encoder). Click the <em>START</em> button. ZSnes should minimize and start MEncoder, encoding the ZSnes movie into an AVI file. By default a file called <strong>video.avi</strong> is created in the same folder as the ZSnes exe file is located. The sound file is by default called <strong>audio.wav</strong> also located in the same folder.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.mortenblog.net/2009/02/23/recording-snes-game-videoes-with-zsnes-and-mencoder/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Wii Virtual Console &amp; the green screen problem</title>
		<link>http://www.mortenblog.net/2009/01/25/wii-virtual-console-and-the-green-screen-problem/</link>
		<comments>http://www.mortenblog.net/2009/01/25/wii-virtual-console-and-the-green-screen-problem/#comments</comments>
		<pubDate>Sun, 25 Jan 2009 21:18:38 +0000</pubDate>
		<dc:creator>Morten André</dc:creator>
				<category><![CDATA[Tips'n'Tricks]]></category>
		<category><![CDATA[Game]]></category>
		<category><![CDATA[Gaming]]></category>
		<category><![CDATA[Retro]]></category>

		<guid isPermaLink="false">http://www.mortenblog.net/?p=346</guid>
		<description><![CDATA[I recently bought the classic game, Bubble Bobble, from Nintendo Wii's Virtual Console shop. But when the game was downloaded, and i attempted to run it, i was greeted with a green crash-looking screen. I could hear the game's sounds in the background, and response from the controller, but the screen was fubar. I was [...]]]></description>
			<content:encoded><![CDATA[<div id="attachment_352" class="wp-caption alignright" style="width: 174px"><a href="http://www.nintendo.com" target="_blank"><img class="size-full wp-image-352" title="Nintendo Wii Console" src="http://www.mortenblog.net/wp-content/uploads/2009/01/wii.gif" alt="Nintendo Wii Console" width="164" height="123" /></a><p class="wp-caption-text">Nintendo Wii Console</p></div>
<p>I recently bought the classic game, <a title="Bubble Bobble" href="http://en.wikipedia.org/wiki/Bubble_bobble" target="_blank">Bubble Bobble</a>, from Nintendo Wii's <a title="Nintendo Virtual Console" href="http://en.wikipedia.org/wiki/Virtual_Console" target="_blank">Virtual Console</a> shop. But when the game was downloaded, and i attempted to run it, i was greeted with a green crash-looking screen. I could hear the game's sounds in the background, and response from the controller, but the screen was fubar. I was using a component cable, and with a composite cable the problem went away. But after spending 50 bucks on the component cable, and seeing the trashy colors from composite signal, i didn't want to give up right away. I googled long before i found a solution that worked for me:</p>
<ol>
<li>Click <strong><em>Wii Options</em></strong> in the <strong><em>Wii Menu</em></strong></li>
<li>Click <strong><em>Wii Settings</em></strong></li>
<li>Click <strong><em>Screen</em></strong></li>
<li>Click <strong><em>Widescreen Settings</em></strong></li>
<li>Select <strong><em>4:3</em></strong> format and <strong><em>Confirm</em></strong></li>
<li>Click <strong><em>Tv Type</em></strong></li>
<li>Select <em><strong>50Hz</strong></em> and <strong><em>Confirm</em></strong></li>
<li>Exit to <strong><em>Wii Menu</em></strong></li>
<li>The Virtual Console game should now start</li>
<li>If not done already, connect your <strong><em>Nunchuck</em></strong> to your <strong><em>Wiimote</em></strong></li>
<li>In the <strong><em>HOME Menu</em></strong>, select <strong><em>Operations Guide</em></strong></li>
<li>Move the pointer away from any buttons on the screen, and press <strong><em>Z+A+1 (or 2)</em></strong> simultaneously</li>
<li>If you hear a ping sound, you should be set to go.</li>
<li>Exit to <strong><em>Wii Menu</em></strong></li>
<li><strong>Reverse changes made in step 1-7</strong>, choosing the correct settings</li>
<li>The game should now run fine</li>
</ol>
<p>This fix might not work with all Virtual Console games. I don't even know what it does, but it worked for my Bubble Bobble.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.mortenblog.net/2009/01/25/wii-virtual-console-and-the-green-screen-problem/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Ricochet Map &#8211; Colosseum 1</title>
		<link>http://www.mortenblog.net/2009/01/02/ricochet-map-colosseum1/</link>
		<comments>http://www.mortenblog.net/2009/01/02/ricochet-map-colosseum1/#comments</comments>
		<pubDate>Fri, 02 Jan 2009 19:20:41 +0000</pubDate>
		<dc:creator>Morten André</dc:creator>
				<category><![CDATA[Half-Life Modifying]]></category>
		<category><![CDATA[Gaming]]></category>
		<category><![CDATA[Mapping]]></category>
		<category><![CDATA[Ricochet]]></category>

		<guid isPermaLink="false">http://www.mortenblog.net/?p=311</guid>
		<description><![CDATA[This is a map for the Half-Life mod called Ricochet. Download the zip file, and follow the instructions in the readme.txt file.
The map was intended to be a team based death-match map, but it also works as a free-for-all death-match map.
Download it here
]]></description>
			<content:encoded><![CDATA[<div id="attachment_312" class="wp-caption alignright" style="width: 192px"><a href="http://www.mortenblog.net/wp-content/uploads/2009/01/screenshot.jpg"><img class="size-full wp-image-312" title="Screenshot of the map" src="http://www.mortenblog.net/wp-content/uploads/2009/01/screenshot.jpg" alt="Screenshot of the map" width="182" height="130" /></a><p class="wp-caption-text">Screenshot of the map</p></div>
<p>This is a map for the Half-Life mod called Ricochet. Download the zip file, and follow the instructions in the <em>readme.txt</em> file.</p>
<p>The map was intended to be a team based death-match map, but it also works as a free-for-all death-match map.</p>
<p><a href="http://www.mortenblog.net/wp-content/uploads/2009/01/map_rc_colosseum1.zip">Download it here</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.mortenblog.net/2009/01/02/ricochet-map-colosseum1/feed/</wfw:commentRss>
		<slash:comments>6</slash:comments>
		</item>
		<item>
		<title>Ostrov (The Island)</title>
		<link>http://www.mortenblog.net/2008/12/17/ostrov-the-island/</link>
		<comments>http://www.mortenblog.net/2008/12/17/ostrov-the-island/#comments</comments>
		<pubDate>Wed, 17 Dec 2008 00:50:08 +0000</pubDate>
		<dc:creator>Morten André</dc:creator>
				<category><![CDATA[Faith & Religion]]></category>
		<category><![CDATA[Music, Video & TV]]></category>
		<category><![CDATA[Christian]]></category>
		<category><![CDATA[Movie]]></category>
		<category><![CDATA[Review]]></category>

		<guid isPermaLink="false">http://www.mortenblog.net/?p=276</guid>
		<description><![CDATA[
If you are up for a good movie this weekend, i can highly recommend the russian movie "Ostrov", released in 2006.
It's about a sailor named Anatoli (Timofei Tribuntsev), who during the second world war gets captured by a German patrol boat, along with his captain Tikhon on a small coal freighter. He's given the choice [...]]]></description>
			<content:encoded><![CDATA[<div id="attachment_282" class="wp-caption alignright" style="width: 170px"><a href="http://www.ostrov-film.ru" target="_blank"><img class="size-full wp-image-282" title="ostrov poster" src="http://www.mortenblog.net/wp-content/uploads/2008/12/ostrov_cover.jpg" alt="Ostrov (The Island)" width="160" height="209" /></a><p class="wp-caption-text">Ostrov (The Island)</p></div>
<p><img class="size-full wp-image-270 alignleft" title="Score: 5/6" src="http://www.mortenblog.net/wp-content/uploads/2008/12/five.png" alt="5/6" width="100" height="100" /></p>
<p>If you are up for a good movie this weekend, i can highly recommend the russian movie "<a title="The official russian Ostrov web site" href="http://www.ostrov-film.ru/" target="_blank">Ostrov</a>", released in 2006.</p>
<p>It's about a sailor named Anatoli (<a title="Timofei Tribuntsev" href="http://www.imdb.com/name/nm1466457/" target="_blank">Timofei Tribuntsev</a>), who during the second world war gets captured by a German patrol boat, along with his captain Tikhon on a small coal freighter. He's given the choice between shooting Thikon and live, or die himself.</p>
<p>He shoots, and the Germans leave him on the boat. But not before they've put explosive charges all over the freighter. The boat explodes, and Anatoli is fortunate to be found alive on the beach by some Orthodox munks. And he settles down there after his recovery.</p>
<p>We then follow an older Anatoli (<a title="Pyotr Mamonov" href="http://www.imdb.com/name/nm0541136/" target="_blank">Pyotr Mamonov</a>) from the year 1976, still living at the monastery, in the boiler hut located on a small island. He is constantly haunted by the fact that he shot his captain and friend, Thikon. He has also become quite eccentric over the years, to put it mildly, and a nuisance to many of the other munks. And while he appears at times to be stark raving mad, there is strange logic to his behavior. People come from far away to see him, asking for help with all kinds of problems; from unwanted pregnancies to demon possessions.</p>
<p>The movie shows a man with strong faith and a hunger for salvation. It is full of good moments and humor.</p>
<p>I give it 5 out of 6.</p>
<p>You can get it at <a title="Buy Ostrov at Amazon.com" href="http://www.amazon.com/Ostrov-Island-version-English-subtitles/dp/B000M094J6" target="_blank">Amazon.com</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.mortenblog.net/2008/12/17/ostrov-the-island/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Getting started with Python and Eclipse on Windows</title>
		<link>http://www.mortenblog.net/2008/12/09/getting-started-with-python-and-eclipse-on-windows/</link>
		<comments>http://www.mortenblog.net/2008/12/09/getting-started-with-python-and-eclipse-on-windows/#comments</comments>
		<pubDate>Tue, 09 Dec 2008 01:45:47 +0000</pubDate>
		<dc:creator>Morten André</dc:creator>
				<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[Python]]></category>
		<category><![CDATA[Tutorial]]></category>

		<guid isPermaLink="false">http://www.moppeblog.net/?p=241</guid>
		<description><![CDATA[Eclipse is an Open Source IDE mainly used for Java development; but with the Pydev plug-in installed it becomes a powerful Python IDE. I will now show you how to get Eclipse ready for your Python code.
1. Installing Python
Before we get started, you should check whether or not Python is already installed on your computer. [...]]]></description>
			<content:encoded><![CDATA[<p>Eclipse is an Open Source IDE mainly used for Java development; but with the Pydev plug-in installed it becomes a powerful Python IDE. I will now show you how to get Eclipse ready for your Python code.</p>
<h3>1. Installing Python</h3>
<p>Before we get started, you should check whether or not Python is already installed on your computer. Look for a folder called Python25 or something similar on your C:\ partition, also check the <em>Add/Remove Programs </em>list in the <em>Windows Control Panel</em> for any Python entries.</p>
<p>If Python is not installed, let's go to <a title="Download Python 2.5.2" href="http://www.python.org/download/releases/2.5.2/" target="_blank">www.python.org</a> and download a copy. There <em>are</em> newer versions, but we'll download Python 2.5.2 to get compatibility with many extensions. You may want to download a newer release if your not too concerned about that.</p>
<p>Execute the Python installer you downloaded, and follow the instructions. The default installation path is "<em>C:\Python25</em>". And unless that causes problems, leave it as it is.</p>
<h3>2. Installing Java</h3>
<p>Eclipse requires Java. So unless it's already installed on your system, you need to get it from <a title="Download Java" href="http://www.java.com/download/" target="_blank">www.java.com</a>, and install it before you continue.</p>
<h3>3. Installing Eclipse</h3>
<p>Let's install the Eclipse IDE. Head over to <a title="Download Eclipse" href="http://www.eclipse.org/downloads/" target="_blank">www.eclipse.org</a> and look for <strong>Eclipse Classic</strong> which will be the release we'll download and use.</p>
<p><img class="size-medium wp-image-243 alignnone" title="Eclipse Classic" src="http://www.mortenblog.net/wp-content/uploads/2008/12/screen01-300x75.jpg" alt="" width="300" height="75" /></p>
<p>At the time of writing, Eclipse for Windows is released as a zip archive. You'll need to extract the folder inside the zip archive, called "<em>eclipse</em>". I recommend clicking on the archive to open it, and just drag the folder to a proper destination on your computer, such as the "<em>C:\Program Files</em>" folder. <span id="more-241"></span>The path to Eclipse will then be "<em>C:\Program Files\eclipse</em>". If Eclipse comes as an executable installer, run it and follow the installation instructions it gives.</p>
<p>When the installer is all good and done, open up the folder you installed/extracted Eclipse in, and run the file called "<em>eclipse.exe</em>". You may want to create a shortcut to the executable on your Windows desktop so that Eclipse can be started quickly and easily in the future.</p>
<h3>4. Running Eclipse for the first time</h3>
<p>If all goes well, you should be asked to choose a folder to use as Eclipse's workspace. I recommend making a folder called "<em>Python Projects</em>" or something similar in the "<em>My Documents</em>" folder and use that as your workspace. If you want to use the same workspace folder every time, tick the check-box that says "<em>use this as the default and do not ask again</em>".</p>
<p><img class="size-full wp-image-244 alignnone" title="Choose Workspace" src="http://www.mortenblog.net/wp-content/uploads/2008/12/screen02.jpg" alt="" width="439" height="211" /></p>
<p>Eclipse should now start without any further hassle, and greet you with a nice <em>Welcome</em> screen.</p>
<p><img class="size-medium wp-image-245 alignnone" title="Eclipse Welcome Screen" src="http://www.mortenblog.net/wp-content/uploads/2008/12/screen03-300x214.jpg" alt="" width="300" height="214" /></p>
<p>But we are not quite ready to start coding yet. So let's continue.</p>
<h3>5. Installing the Pydev plug-in</h3>
<p>Eclipse has a nice feature that makes installing plug-ins such as Pydev a breeze. Just open up the <em>Help</em> menu, and select "<em>Software Updates</em>".</p>
<p><a href="http://www.mortenblog.net/wp-content/uploads/2008/12/screen04.jpg"><img class="alignnone size-full wp-image-246" title="Eclipse Software Updates" src="http://www.mortenblog.net/wp-content/uploads/2008/12/screen04.jpg" alt="" width="469" height="230" /></a></p>
<p>In the window that opens up, select the "<em>Available Software</em>" tab and click the "<em>Add Site</em>" button. An input box should open up. Enter "<em>http://pydev.sourceforge.net/updates/</em>" and click <em>OK</em>.</p>
<p><img class="alignnone size-full wp-image-247" title="Eclipse Software Updates and Add-ons" src="http://www.mortenblog.net/wp-content/uploads/2008/12/screen05.jpg" alt="" width="401" height="338" /></p>
<p>The address you entered should now appear in the site list, letting you select Pydev for download and install. Tick the check-boxes for Pydev, and click the "<em>Install...</em>" button.</p>
<p><img class="alignnone size-full wp-image-248" title="Eclipse Plugin Pydev Installation" src="http://www.mortenblog.net/wp-content/uploads/2008/12/screen06.jpg" alt="" width="424" height="359" /></p>
<p>Review your choices and the licenses for Pydev. When ready, click "<em>Finish</em>". Depending on your Internet connection, the download can take a couple of minutes to finish and install.</p>
<p>You'll be asked to restart Eclipse, which is a good idea, so let's go ahead and do it.</p>
<h3>6. Configuring Pydev</h3>
<p>We may need to tell Pydev where the Python interpreter is located on your computer. Select "<em>Window &gt; Preferences</em>" in the Eclipse menu. Eclipse's configuration window will open. Select "<em>Pydev &gt; Interpreter - Python</em>". If your Python interpreter is not listed, we'll have to add it by clicking the "<em>New...</em>" button.</p>
<p>Browse to the folder where you installed Python, in our case "<em>C:\Python25</em>", and select the file called "<em>python.exe</em>". If all goes well, the necessary folders will be automatically included into the configuration, leaving the window looking something like this:</p>
<p><img class="alignnone size-full wp-image-249" title="Configuring Pydev" src="http://www.mortenblog.net/wp-content/uploads/2008/12/screen10.jpg" alt="" width="499" height="485" /></p>
<p>Click <em>OK</em> to save your configuration.</p>
<h3>7. Creating your first Pydev project</h3>
<p>Eclipse will start again, hopefully without problems. Now, go ahead and create your first Pydev project. Select "<em>File &gt; New &gt; Project</em>" from Eclipse's menu.</p>
<p><img class="alignnone size-full wp-image-250" title="Creating a Pydev project" src="http://www.mortenblog.net/wp-content/uploads/2008/12/screen08.jpg" alt="" width="409" height="414" /></p>
<p>A window will open, letting you choose the type of project to create. We want to make a Python program, so choose "<em>Pydev &gt; Pydev Project</em>"<br />
<img class="alignnone size-full wp-image-251" title="Pydev Project" src="http://www.mortenblog.net/wp-content/uploads/2008/12/screen09.jpg" alt="" width="415" height="416" /></p>
<p>Click <em>Next</em>, and choose a name for your project, location, and the Python version to use (in this case, select Python 2.5).</p>
<p><img class="alignnone size-full wp-image-252" title="Creating a Python source file in Eclipse" src="http://www.mortenblog.net/wp-content/uploads/2008/12/screen11.jpg" alt="" width="418" height="414" /></p>
<p>Click the <em>Finish</em> button, and voila; your project is ready to begin. Let's create a Python source file by selecting "<em>File &gt; New &gt; File</em>" in the menu. Enter the desired file-name (in this case; helloworld.py) and parent project, so it looks similar to this:</p>
<p><img class="alignnone size-full wp-image-253" title="Creating a Python source file" src="http://www.mortenblog.net/wp-content/uploads/2008/12/screen13.jpg" alt="" width="417" height="351" /></p>
<p>Now, let us enter in a standard "Hello World" program.</p>
<p><a href="http://www.mortenblog.net/wp-content/uploads/2008/12/screen15.jpg"><img class="alignnone size-medium wp-image-254" title="Enter the Hello World program" src="http://www.mortenblog.net/wp-content/uploads/2008/12/screen15-300x202.jpg" alt="" width="300" height="202" /></a></p>
<p>And for the finale; click the green Run button, the one that looks like a Play button. If you get an error the first time, click on the arrow to the right of the Run button, and select "<em>Run As &gt; Python Run</em>"</p>
<p><a href="http://www.mortenblog.net/wp-content/uploads/2008/12/screen16.jpg"><img class="alignnone size-medium wp-image-255" title="Run your Python program" src="http://www.mortenblog.net/wp-content/uploads/2008/12/screen16-300x204.jpg" alt="" width="300" height="204" /></a></p>
<p>If all goes well, the Python program should run fine, and the output should appear in Eclipse's Python console.</p>
<p><a href="http://www.mortenblog.net/wp-content/uploads/2008/12/screen17.jpg"><img class="alignnone size-medium wp-image-256" title="Congratulation, Eclipse is ready for your Python code!" src="http://www.mortenblog.net/wp-content/uploads/2008/12/screen17-300x204.jpg" alt="" width="300" height="204" /></a></p>
<p>Happy hacking!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.mortenblog.net/2008/12/09/getting-started-with-python-and-eclipse-on-windows/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>The Tragically Hip &#8211; Nautical Disaster</title>
		<link>http://www.mortenblog.net/2008/12/07/the-tragically-hip-nautical-disaster/</link>
		<comments>http://www.mortenblog.net/2008/12/07/the-tragically-hip-nautical-disaster/#comments</comments>
		<pubDate>Sun, 07 Dec 2008 20:10:04 +0000</pubDate>
		<dc:creator>Morten André</dc:creator>
				<category><![CDATA[Music, Video & TV]]></category>
		<category><![CDATA[Media]]></category>
		<category><![CDATA[Music]]></category>
		<category><![CDATA[Video]]></category>

		<guid isPermaLink="false">http://www.moppeblog.net/?p=229</guid>
		<description><![CDATA[
<object	type="application/x-shockwave-flash"
			data="http://se.youtube.com/v/e8Fi46BFAF0"
			width="700"
			height="557">
	<param name="movie" value="http://se.youtube.com/v/e8Fi46BFAF0" />
	<param name=wmode" value="transparent" />
</object>
]]></description>
			<content:encoded><![CDATA[<p><code>
<object	type="application/x-shockwave-flash"
			data="http://se.youtube.com/v/e8Fi46BFAF0"
			width="700"
			height="557">
	<param name="movie" value="http://se.youtube.com/v/e8Fi46BFAF0" />
	<param name=wmode" value="transparent" />
</object></code></p>
]]></content:encoded>
			<wfw:commentRss>http://www.mortenblog.net/2008/12/07/the-tragically-hip-nautical-disaster/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
