Morten's Blog


The random output of Morten André Steinsland

Highscore module for Python using SQLite

Posted by Morten André on November 1, 2009 at 10:01. In the Python, Tutorials category.
Tags : , , , , ,

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.

(Read More..)

Getting started with Python and Eclipse on Windows

Posted by Morten André on December 9, 2008 at 02:45. In the Tutorials category.
Tags : , , ,

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. Look for a folder called Python25 or something similar on your C:\ partition, also check the Add/Remove Programs list in the Windows Control Panel for any Python entries.

If Python is not installed, let’s go to www.python.org and download a copy. There are 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.

Execute the Python installer you downloaded, and follow the instructions. The default installation path is “C:\Python25“. And unless that causes problems, leave it as it is.

2. Installing Java

Eclipse requires Java. So unless it’s already installed on your system, you need to get it from www.java.com, and install it before you continue.

3. Installing Eclipse

Let’s install the Eclipse IDE. Head over to www.eclipse.org and look for Eclipse Classic which will be the release we’ll download and use.

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 “eclipse“. I recommend clicking on the archive to open it, and just drag the folder to a proper destination on your computer, such as the “C:\Program Files” folder. (Read More..)

Powered by WordPress
Theme by Morten Andrè Steinsland
61 queries. 0.142 seconds.