Close to the Machine

Jerry Kurlandski

Python

A few Python tips and tasks.

A few things I've picked up since my turn toward using Python for major software development projects.

Note: All the examples on this site should work in version 2.7 or greater. For the sake of full disclosure, however, to get some of them to work you may have to import division and print_function from future, and have six as a project dependency.

Table of Contents

Unit Testing

Some unit testing examples.

Using Enum

How to use Python Enums.

List & Dictionary Comprehension

On list and dictionary comprehension in Python.

Miscellaneous Topics

On various Python topics.

Python Virtual Environments

Creating a virtual environment.

Python News & Resources

Recent news and useful resources for Python.

<