Posts tagged: python

25. March 2016

Python tempfile - Temp Files and Directories

Programs often need temporary files and directories to store data. Sometimes they are created, used, and deleted immediately. Other times temporary files and directories are simply used as a way of determining a writable location that won’t clutter the file system. The Python tempfile module can be used as a reliable cross-platform solution to temporary files and directories.


21. March 2016

Python Decorators

Python decorators are a way of wrapping a function or method with another function or method. Decorators use the @name syntax and are placed on the line before the def keyword.


13. March 2016

Using Virtualenv from Within Python

Virtual environments are an ideal way to isolate your Python environments without polluting your host system. While typically created through the command-line utility virtualenv, virtual environments can also be created and activated programmatically in Python. This post details how this can be done.