Archives September 2011
Ran into a little problem today that requires being able to see what timezones (of the Linux-ish America/Toronto, America/Montreal variety) are equivalent to one another.:
#! /usr/bin/env python
"""Stupid little script to find equivalent timezones"""
import pytz, pprint, pickle, datetime
all_timezones = [pytz.timezone(name) for name in pytz.all_timezones]
Django model forms are already easy. How could they be easier?
@decorators.with_X( request, model_class, key, url_field, parameter, required=True )
def my_view( parameter ):
We also use decorators that do x.y lookup on another parameter (i.e. lookup a particular object in the fields of another object based on ids (root_object.field.get( id=...))). Sure ...
By popular demand (well, one user so far), I've added rudimentary support for window state storage to RunSnakeRun. There's lots more state that could be stored, but for now it just stores the window position, size and maximization. Should be considered an alpha-level feature for now, as it is untested on Win32 or ...
Have just released this release. Not a lot of new features, though there are a number of bug fixes and a lot of new extensions, including the OpenGL 4.2 ARB modules. Particularly need testers with Win32 and OSX.
Customer asked me to look at a 2.5 based project yesterday. No problem, just fire up my virtualenv and take a quick look. Hrm, no, the virtualenv isn't working... Python 2.5 isn't installed. Hrm, and it's not in the apt repository for Natty. Hrm... okay, build from source... fail on ...
Got the GLE DLL built using VC9 (a.k.a. 2008), and a mechanism in place to load the GLE DLL based on which version of Python you are running (unfortunately, I don't see a good hook to check for the vcX version to use that to decide which DLL to load. In theory ...
I wanted to test PyOpenGL under 3.2 (using 2to3), but my entire test-suite is written in OpenGLContext, which is dependent on many other libraries (numpy, pydispatcher, pyvrml97, fonttools, ttfquery, simpleparse, etceteras). So, since I want to test, let's see how easy it is to convert the SimpleParse-pure project (written to test pypy speed ...
We should now have up to OpenGL 4.2 supported in PyOpenGL bzr head, should someone have a desire to play with it and hardware/drivers capable of running it.
Since there is a 4-year old still-open ticket on this, thought I'd provide a simple recipe for getting a coverage report on your Django project:
pip install coverage
coverage run path/to/django-admin.py test myapp
coverage report -m --include="*myapp*"
coverage erase # clean up afterward/between runs
Sure, it's not --with-coverage, but ...
- Sept. 1, 2011
- Sept. 6, 2011
- Sept. 11, 2011
- Sept. 12, 2011
- Sept. 17, 2011
- Sept. 19, 2011
- Sept. 26, 2011
- Sept. 27, 2011