Latest articles tagged python

Teaser image

Function attributes are a relatively little-known corner of the Python language. Ultimately, this is because most of the problems they may solve are arguably better solved by a different approach (as will be shown). However, understanding why they exist may highlight some interesting cornerstones of Python's design to beginners or even intermediate users.

Prior to beginning, I'd like to make it clear that my purpose is not to proselytize, merely inform. Function attributes appears to be a topic that has not been blogged-to-death so I thought they might be worthwhile to discuss at some length. Read more...

Teaser image

It may be tempting to assume that def foo makes available the name foo to the function block every time it is run, similar to how for x in ... would make the name x available inside a for block. This is not the case, however: Read more...

Teaser image

pip is an incredibly handy package manager for Python. As of Python 3.4, it is included with default distributions of Python.1 Once you are used to using it, you will miss having it when stuck working with older versions.

Fortunately, pip can be installed to pre-3.4 versions of Python in a few simple steps. Oddly enough, though the process is simple, a complete solution wasn't easily available (via very quick Googling, anyway) so I'll write the process here. Read more...

Teaser image

Deploying a website is a pain. Using a "simplified" service, e.g. Heroku, it's still a pain but you don't learn very much. I learned that firsthand when I deployed my first Django project using Heroku. When the process was complete, I felt I had learned vaguely how to use Heroku's tools, and next to nothing about deployment in general.

For my next project, I decided to use a service that could provide me with only a Unix box and force me to do everything else. I went with DigitalOcean, as it offers an inexpensive basic server and met my needs.

DigitalOcean provides some helpful guides for getting started, but I quickly ran into caveats and outdated information that could be very frustrating. Read more...

« Page 2 / 2