A "Best of the Best Practices" (BOBP) guide to developing in Python.
- "Build tools for others that you want to be built for you." - Kenneth Reitz
- "Simplicity is alway better than functionality." - Pieter Hintjens
#!/usr/bin/env python | |
# 1. Save this file in your ~/.gimp-2.8/plug-ins/ directory | |
# 2. Run gimp from terminal | |
# 3. Go to Filters/Python-Fu/IPython Console | |
# 4. Go back to terminal to enjoy interactive Gimp scripting | |
# | |
import gimpfu | |
import gimp | |
from gimpfu import pdb |
# Colors for the prompt | |
blue="\033[0;34m" | |
white="\033[0;37m" | |
green="\033[0;32m" | |
# Brackets needed around non-printable characters in PS1 | |
ps1_blue='\['"$blue"'\]' | |
ps1_green='\['"$green"'\]' | |
ps1_white='\['"$white"'\]' |
#include <iostream> | |
#include <iomanip> | |
// | |
// Utilities | |
// | |
// RETURNS() is used to avoid writing boilerplate "->decltype(x) { return x; }" phrases. | |
// | |
// USAGE: auto function(<arguments>) RETURNS(<some-expression>); | |
// |