Category Archives: Python

Do you need a ticket to PyCon 2018?

I have one ticket (main conference, no tutorials) for Pycon 2018 in Cleveland that I will not be able to use. It is at the the early-bird rate of $350. Please contact me if you are interested in it.

Posted in Python | Leave a comment

Using Beets from 3rd Party Python Applications

I am thinking of using Beets as music library to update a project. The only example of using it this way is in the source code of the Beets command-line interface. That code is well-written but does much more than … Continue reading

Posted in Python | Tagged | Leave a comment

Plane Spotter

My new app Plane Spotter has been approved. The interesting part of it is that it is written in Python and Kivy. Having written Android apps in Java, Cordova, and now Python, I can unequivocally say that the Python/Kivy combination … Continue reading

Posted in Kivy, Python | Leave a comment

Repeating Sections in a Django Template

I have a need to have multiple sections of name/value pairs with a header on some pages. Something like: <div class="row">     <div class="span6">         <div class="row"><div class="span3"><h2>History:</h2></div></div>         <div class="row"><div class="span2">Date added to fleet:</div><div class="span2">{{plane.dateAddedToFleet}}</div></div>         <div class="row"><div class="span2">Total Flight Time:</div><div class="span2">{{plane.totalFlightTime|asTime}}</div></div>         <div … Continue reading

Posted in Django, Python | 8 Comments

Rate limiting with django-ratelimit

I was playing around with James Socol’s django-ratelimit tonight. It provides a decorator to rate-limit view functions. Very nice! I wanted to use it for login blocking, and some minor changes helped this out. My forked version of django-ratelimit is … Continue reading

Posted in Django, Python | Leave a comment

Custom Tag to Render Avatar in Django Userena

Here is a simple custom tag to render a users avatar (‘mugshot’) when using Django Userena. It optionally takes width and or height in pixels. Place the following code in /templatetags/ your_app/     templatetags/ from django import template … Continue reading

Posted in Django, Python | Leave a comment

Django Image Field Overwrite with ImageKit

I’m using django-imagekit on a new site. I was having a problem that when a user uploaded a new image for the object, the system would not overwrite the existing image file, but instead would create a new file with … Continue reading

Posted in Django, Python | Leave a comment

SimpleJson Error with django under google app engine

Since moving over to 64 bit windows 7, I’ve had this error when starting up: "…] zipimporter('C:\\python25\\lib\\site- packages\\simplejson-2.0.9-py2.5-win.egg', 'simplejson\\') … … SetGlobals() … … File "C:\Program Files\Google\google_appengine\google\appengine\dist\", line 268, in _getitem__ info = _zipfile_cache[self._archive].getinfo(filename) File "C:\Python25\lib\", line 462, … Continue reading

Posted in Python | Leave a comment

Sequence from every Nth Item of another Sequence

The phrase ‘every Nth item‘ may be off here, but it is close enough what I want to do (reduce a data set for charting purposes). # data = sequence of data items # nth = you want every nth … Continue reading

Posted in programming, Python | 12 Comments

In-Application Customer Feedback

Matt Wilson asked about ‘awesome web-apps to let customers suggest/vote/comment’ on upcoming features.‘ This gave me the idea to post about ErgMate’s in-application feedback mechanism. In addtion to sending an email to the support mailbox, there are two other ways … Continue reading

Posted in Micro-isv, programming, Python | Leave a comment