The Canvas of Ryan Sadwick

Tag Archives: python

 

Installing Pyglet on OSX

Oct. 21st | Posted by 0 comments
If you’re getting this error while installing pyglet on OSX: OSError: dlopen(/System/Library/Frameworks/QuickTime.framework/QuickTime, 6): no suitable image found. Did find: /System/Library/Frameworks/QuickTime.framework/QuickTime: mach-o, but wrong architecture /System/Library/Frameworks/QuickTime.framework/QuickTime: mach-o, but wrong architecture This means you need to set Python to 32 bit. To view a great list of easy steps, check out roguejs’ blog: http://roguejs.com/2011-11-22/getting-pyglet-to-work-on-mac-osx-lion/

Tags: ,

Django: can’t compare offset-naive and offset-aware datetimes error

May. 1st | Posted by 3 comments
I was testing out django-registration, a simple login system that has a few features: forgot password, activation email. I ran into an error while firing up the admin: can’t compare offset-naive and offset-aware datetimes error with Django-registration. There is logic in this package where it records the user’s creation date and last login date. The [...]

has_key in Python, deprecated in 3.0

Mar. 27th | Posted by 0 comments
While moving over to Python 3, you’d probably notice a few syntax changes. If you have a dictionary and you’re looking for missing keys and such, using something like d.has_key(‘a’), you’ll soon find out has_key has been deprecated. Below is what I’ve been using:

Tags:

Tip Jar

If you find my blog useful, tip me a few dollars to show your love and support.

Categories