Thanks for the great ideas

I’d like to thank everyone that commented on my last post, and everyone that has emailed me ideas. They are all very much appreciated. It’s hard keeping up with everything that is happening in the Python world, and sometimes the coolest things are happening in far off places.

I got a few suggestions for Pycairo, which is something that I have considered in the past, but I’ve found it a little bit difficult and time consuming do to the lack of Python specific documentation.

The MDP toolbox also looks pretty cool, I just have no idea what I could possibly do with it!

If anyone else has anymore ideas please let me have them. Anything graphical, non-graphical, game related, swarm theory, random generation, AI, a Rorschach test creator…anything! I’m collecting ideas for this blog and my monthly column so anything that would also really interest new Python programmers would be a huge plus.

Take care and get ready for 3000!

Creating a game with PyGlet and Python

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

Continue reading Creating a game with PyGlet and Python

Python Magazine Issue One!

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!

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

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

Creating a game using python and Silverlight 1.1

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

Continue reading Creating a game using python and Silverlight 1.1

Python 3000 Status Update from Guido

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

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.

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

New Comment Moderation

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

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.

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

PyLan two

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

In this tutorial I will go over the following items:

This tutorial is organized into the following sections:

  1. The GUI
  2. The todo.Task Object
  3. Adding a todo.Task object
  4. Showing the Calendar window
  5. Editing todo.Category and todo.Task items
  6. Pango markup in the gtk.TreeView
  7. Conclusion

Python GTD pyGTK

You can download the full source to this tutorial here.

Continue reading PyLan a GTD todo application written in python and PyGTK – part two