Virtual environments create sandboxes for your code. So that other Python packages that are installed for other programs do not interfere with your current project.
virtualenv venv
source venv/bin/activate
PIP is your package manager. It allows you to easily install and uninstall versions of python packages from the Python Package Index https://pypi.python.org/pypi.
pip install requests
pip uninstall requests
pip freeze
pip freeze > requirements.txt
Creating a requirements.txt file is a convention that allows you to more easily install multiple python packages.
pip install -r requirements.txt
3. Print statements, functions, docstrings, comments, constant variables, lists, loops, writing to a file, creating directories, classes/instances,
Summary of what we'll be covering and what code we'll be creating in order to cover some of these subjects.
- print statements
- functions
- docstrings
- comments
- variables
- lists
- conditionals
- loops
- files
- directories
- classes and instances
Building the code
- Calling a function (calling script, functions, variables, docstring)
- Download an image (importing, writing a file)
- Download multiple times (lists, looping)
- Download multiple images (string.format)
- Making directories (making, detecting, and creating paths)
- Manipulating images (binary data, classes, instances, and methods)
For Windows folks, this may be handy: http://www.tylerbutler.com/2012/05/how-to-install-python-pip-and-virtualenv-on-windows-with-powershell/