Last Online: 8/31/07

Nathan Ostgard

     
Between Panda3D and Pygame I think I've found my Shangri-La. Python can have my babies. Honestly, I think it might have already, although that could have been some bad food poisoning...

Systems I Own:          
[center][/center]

Stuffs I Says About Games

In ActionScript 3, you can extend a class from the Proxy class to override the behavior of many language level operations, making it a valuable tool for advanced development. However, they are much slower than sealed classes, so be careful with their use when high performance is necessary. ...

Google gives great instructions on how to get IMAP access setup in Thunderbird. But it can take some searching to work out all the kinks. Here are some tips to save you the digging I had to do: Fixing the IMAP folders Thunderbird tries to create its own folders for Sent Items, Drafts, and ...

Game Objects is a collection of 2D and 3D maths classes, and algorithms for helping in the creation of games with Python. Will McGugan’s Game Objects library has been invaluable for my dabblings in Python game development. It provides optimized objects for common graphics math ...

Decided to move some of my vertex array code over to ARB_vertex_buffer_object, to see if I could get a bit of a speed boost out of PyOpenGL. Much to my dismay, these functions don’t have the sexy extension wrappers I talked about before, so it was a bit of a chore to get it all workin ...

When I have Django URL patterns like: urlpatterns = patterns('', (r'^(?P<foo_id>\w+)/$', 'myproject.myapp.views.show'), (r'^(?P<foo_id>\w+)/edit/$', 'myproject.myapp.views.edit'), (r'^(?P<foo_id>\w+)/delete/$', 'myproject.myapp.views.delete'), ) I always end up wi ...

Guardian of the Road Lizard.Decal on an old abandoned truck I came across. ...

Normally if you wanted to get access to an OpenGL extension, you’d have to do something like: from ctypes import * from OpenGL import platform gl = platform.OpenGL glGetShaderiv = gl.glGetShaderiv glGetShaderiv.argtypes = [c_int, c_int, POINTER(c_int)] Gross. Luckily, PyOpenGL ...

There’s no way in Django (that I’ve found) to render a field’s name in a template. This means you end up with <th>Field Name</th> all over your templates. Why hello there, DRY violation! The fields are stored in model._meta.fields, but templates don’t al ...

In Python: import os.path, random, string def random_filename(chars=string.hexchars, length=16, prefix='', suffix='', \ verify=True, attempts=10): for attempt in range(attempts): filename = ''.join([random.choice(chars) for i in range(length)]) filename = pref ...

When most pages in a site require authentication, decorating all the views with @login_required can be annoying. You can reverse the default behavior by creating a custom middleware class: 1. middleware.py import urllib from django.conf import settings from django.contrib.auth import REDI ...