Suppose you want to incorporate tweeting into an app you're building on your Raspberry Pi.
Python is howchoo's favorite programming language. We believe python promotes the most organized and performant codebase possible. We also love Django so, naturally, we love Python. Fun fact: Python's name is derived from the television series Monty Python's flying circus. It's very common to find references to Monty Python in Python tutorials.
Virtual environments are valuable, especially for development, because they allow you to keep your Python environment isolated from other applications and the rest of the system.
Django forms are an excellent way to manage user input in a Django application. Once you learn how to wield them, you'll never go back to manually coding a form tag and handling the response.
This guide is meant for people who are not overly familiar with recursion and would like to learn practical ways to use it in Python. The principles apply to other languages too.R
Generators in Python are incredibly powerful yet often hard to understand. In this guide we'll cover generators in depth.
Trying to run iPython inside of a virtualenv virtual environment will likely result in this error: WARNING: Attempting to work in a virtualenv.
Descriptors are used to manage access to an attribute. They can be used to protect an attribute from changes or automatically update the value of a dependent attribute, as we'll see in this guide.
This guide will cover the basics of how to use three common regex functions in Python - findall, search, and match. These three are similar, but they each have different a different purpose.
In Python, regular expression matches can be returned in the form of a match object. In this guide, I'll cover the basics of how to make use of a match object.
Today, I stumbled upon a use case where I needed to have a querysets that had objects from different models. Django has a neat "contenttypes framework" which is a good way to achieve this.
howchoo was originally built in PHP and Codeigniter, then we switched completely to Django in February of 2015.
Much of what you need to do with Python can be done using built-in containers like dict, list, set, and tuple. But these aren't always the most optimal.
How many times have you been put into situations where you had to update somebody else's code. If you are part of a development team my guess is more often than you would like.
You may not need to deal with fractions often, but when you do Python's Fraction class comes to the rescue.
I have been programming for a while and have only recently begun to implement testing into my development process. Needless to say, this guide is intended for someone who is starting at ground zero.
This is frequently used as a programming challenge. There are a few ways to do this, but here is one especially interesting way that I've found.
There are two kinds of loops in Python. In this guide we'll cover both the "for" loop and the "while" loop. We'll also cover how to control these loops by continuing and breaking out.
This guide provides an overview of Python map function. Python 2 and Python 3 have subtle differences in implementation, but they are generally used in the same way.
The solution is simple using the extended slice operator. "some string"[::-1] will print the string in reverse resulting in "gnirts emos" . This guide provides an explanation of how this works.
List comprehension is a beautiful way to simplify code. According to the python documentation, "list comprehensions provide a concise way to create lists."
I started programming in PHP, so by default I would use apache even when I just wanted to test basic HTML files. As I was learning Python, I discovered a great HTTP request handler.