I’m still here

January 24th, 2008

No I’m not dead…even after the recent car accident….I’ve just been busy. Busy writing for columns for the monthly Python Magazine. But that does not mean that his blog is dead! In fact I’ve been spending the last hour looking around the web for something new and cool in the world of Python.

I’m looking for something new to sink my teeth into, something different. I’m looking forward to Python 3000, I’ve been trying to keep up with many of the changes and so far it’s looking really good. But in the mean time there must be something happening in the far off corners of the Python world…where someone is doing something extremely cool.

Please if you have an idea let me know, send me an email, or add a comment to this post. Is there anything that you want me to cover here? A tutorial that you would like? A tutorial that you have written? A new module you wrote? Whatever it is let me know! A new visualization tool? More Python on the web?

I’ve been spending too much time in the world of C++ lately and I’m hungry for some Python…


Creating a game with PyGlet and Python

November 10th, 2007

For this tutorial I’m going to take a look at PyGlet: “a cross-platform windowing and multimedia library for Python.” The reason that I decided to take a look at PyGlet is because it is an alternative to PyGame in the Python gaming world and: “No external dependencies or installation requirements. For most application and game requirements, pyglet needs nothing else besides Python, simplifying distribution and installation.”[1]

The first step to using PyGlet is to actually download it and install it (http://pyglet.org/download.html) as of writing this PyGlet is at version 1.0 alpha 2 (as I finished this tutorial Beta 1 was released but I have been unable to try it out), so between now and the final release there are bound to be a few changes. Once you have download the correct version for your system install it an you are ready to go. I’m writing this on a Debian box so I downloaded the source distribution and installed it using the following, as per the instructions:


python setup.py install

Now like PyGame, PyGlet is a framework for developing games or other applications, it is not a game engine, therefore if you are looking to create a full game you will need to create your own, or use someone else’s. This tutorial will not going into full game creation, instead it will introduce PyGlet using a small sample application, hopefully giving you enough of the basics, or enough of a taste to continue on with it.

You can download the full source to this tutorial here.

Python Game PyGlet

Read the rest of this entry »


Python Magazine Issue One!

October 4th, 2007

The first issue of Python Magazine is finally available and they’ve made it freely available via PDF.

The magazine is quite good and I’m please to announces that I’m writing a monthly column for it entitled “Welcome to Python”. So if any of you are wondering why the posts on this blog have slowed down a little, well it’s because I’ve been trying to do double duty lately, writing posts and columns!

Hopefully I’ll be able to balance the two a little bit better in the future, but for October you can check out my article!

PyLan a GTD todo application written in python and PyGTK – part four context menus!

September 23rd, 2007

PyLan Four

Hello welcome to the fourth installment of the PyLan tutorial. This will be a quick tutorial to introduce one feature: context (or popup) menus. I’ve had many questions regarding this so I thought I would take a quick stab at it.

If you want to follow along with the code in detail, and have not done so already, you should read part one, part two and part three of this series.

You can download the full source to this tutorial here.

Python GTD pyGTK

Read the rest of this entry »

Creating a game using python and Silverlight 1.1

July 29th, 2007

This tutorial assumes that you have a passing understanding of Silverlight and Microsoft’s .NET technologies. If you do you should have no trouble understanding everything in this code, and chances are you will understand some of it more then I do!

But to start it off here is a little bit of information straight from Microsoft’s website:

Silverlight is a new Web presentation technology that is created to run on a variety of platforms. It enables the creation of rich, visually stunning and interactive experiences that can run everywhere: within browsers and on multiple devices and desktop operating systems (such as the Apple Macintosh). In consistency with WPF (Windows Presentation Foundation), the presentation technology in Microsoft .NET Framework 3.0 (the Windows programming infrastructure), XAML (eXtensible Application Markup Language) is the foundation of the Silverlight presentation capability.
This white paper will step you through the basics of Silverlight and how you can use the Microsoft stack of tools, including Microsoft Expression Blend, Microsoft Visual Studio 2005, and XAML to build rich graphical sites. First, let’s take a primer on the background leading up to Silverlight and where it stands on the development landscape.

What we are going to do is create a simple game with falling targets that they user has to click on in order to “hit” them. Each time they hit a target they will get a point and another target will be created.

Python silverlight

You can try the “finished” product out here: http://www.learningpython.com/silverpy/index.htm

Read the rest of this entry »

Python 3000 Status Update from Guido

July 5th, 2007

I just stumbled on this and I thought I’d pass it onto my fellow python programmers, it’s a python 3000 status update from Guido van Rossum.

Personally I’m looking forward to Python 3.0, I don’t know if I’ll like the break in backwards compatibility but a lot of the changes seem great.

Making the print statement a function is a good choice in my opinion.

So instead of:

print "this is printing"

We’ll be using:

print("this is python 3.0")

Also instead of % to format strings, there will be a format() function, which is so much clearer in my opinion.

There are many other changes (say goodbye to old-style classes) so give the link a read and let me know what you think!

PyLan a GTD todo application written in python and PyGTK – part three

July 4th, 2007

PyLan three

Hello welcome to the long-time-coming third article in this tutorial. I apologize to everyone (anyone?) that was waiting for it. I have been very busy as of late and have had much of my time taken up by a few other python projects, that I hope to be able to show you all soon.

If you want to follow along with the code in detail, and have not done so already, you should read part one and part two of this series.

Python GTD pyGTK

You can download the full source to this tutorial here.

This tutorial will teach you the following things:

  1. How to construct a simple theme engine, or at least how I would, hopefully it will give you some ideas!
  2. How to display icons in a gtk.TreeView
  3. How to catch the selection event in a gtk.TreeView.
  4. How to enable or disable widgets.
  5. How to remove the selection from a gtk.TreeView if the user clicks on the gtk.TreeView but not on a tree item.

Read the rest of this entry »

Away for a bit

May 23rd, 2007

Hello everyone,

I know that this blog has been rather quiet lately, but you can talk to my boss about that…but I think things are going to cool down a bit soon and I will be able to start posting here again regularly, and not just tutorials.

For the next little while I will be away from the computer so I won’t be able to read any posts or moderate any comments…sigh…this means that I will have to turn the comment moderation off and try blocking some words or phrases.

In the meantime please ignore the spam as best you can.

I hope you are all doing well and that you python programming is good.

Also, if anyone has any python projects that they would like me to highlight or take a look at please let me know.

New Comment Moderation

May 4th, 2007

Hey everyone, I’ve been getting hit with a bunch of spam comments over the last few days so I’ve made it so that all comments must be moderated before they will appear.

Sorry about this, I don’t like this form of comment posting, but hopefully after a few days I will be able to switch it back to normal.

And sorry about the lack of posts here, yes I am still alive, it’s just that real life has been working me pretty hard these last few weeks.

I’ve been playing around with my PyGTK app and a new PyGame engine that I am working on from the ground up. Something that I can understand and that I can use. I’ll post more information about it when there is more information…right now it does next to nothing!

Spanish Translations

April 9th, 2007

So I’ve been working on PyGame for PyWeek lately and I’ve been having a lot of fun. I also took a weekend off from my email so I did not notice that Lord Taran has been creating Spanish translations for a bunch of my PyGTK tutorials.

If you are interested in the Spanish tutorials check them out, or if you are interested in seeing what happened at pyweek and the car crash that was my entry check it out as well.