I know it’s been a while and for that I apologize the last few months have been pretty crazy around here…although I’m starting to see a trend with life in general lately, namely that it’s always crazy. I’ve been busy with work, Python Magazine, my wife, trips to Dallas, and yes whenever I get a [...]
Archive for the 'beginnings' Category
This is a quick post on how to use menu’s in Tkinter, if you are unfamiliar with Tkinter you might want to check out some of my other Tkinter related posts. We are going to start of with a basic python Tkinter app: #! /usr/bin/env python from Tkinter import * class App(Frame): def __init__(self, master): [...]
All right in Part one we actually created a semi-working almost-game, in part two we’re going to go a bit further, in part two we’re going to add the walls that will make help make PyMan (our python based PacMan clone) an actual game. Note: Part one has been mistakenly half-deleted by me, so it [...]
Prerequisites In order to follow along with this tutorial you will need Python 2.4 and PyGame 1.7.0+ installed. Since I’m doing this all on a Mac and Python 2.4.2 is not available from MacPython or any other site as a disk image I decided to install from source. If you are try to build Python [...]
Well as someone who programs a lot and likes using computers creating a viedo game is always something that I’ve wanted to do. In the past I spent a lot of time learning OpenGL and actually went quite far in the creation of a simple/not-so-simple game. The game was put on hold indefinitely once real [...]
Up until now we’ve focused on python applications that only run in the command line. For a lot of tasks this is great, but in order to be really impressive we’re going to want to create a GUI for some of our python applications. There are a lot of python GUI toolkits out there, but [...]
Please remember to read part one and part two. Classes and Generators All right, now that we have split our RSS reader up into functions, we’re going to go one step further and put our code into a class. We’re also going to do something a bit more advanced with our class and create a [...]
This post is my continuation of my Python based RSS reader that I wrote in part one. As I said the code written in part one is not something that you would ever really want to use or maintain since it wasn’t broken up in to functions properly. So, in this part we’re going to [...]
All right so I’ve already figured out how to write an executable script that writes out “Hello World!” to the command line, now I need to figure out how to do something interesting. As a result I was surfing the Internet and reading some Python documentation, trying to come up with something to do but [...]
Well after reading the python documentation for a few days I decided it was time for me to write my first real script. Now I’ve written a few scripts before in the python interpreter, but I wanted to try my hand at creating some stand-alone executable file.
Now I didn’t want to go too crazy with my first script so I thought I would start off with the simplest program that everyone knows, the Hello World program. For this example I’m going to use the gedit since I already have it installed and it comes with built-in python syntax highlighting, but any standard or fancy text editor could be used in its place.