Blocks are kind of like functions. The store a sequence of expressions to be evaluated later. They are a value, so like any value they need to be bound to a name to be stored.
let first = {
print 'Hello, world!'
}
def to_cli_args(*args, **kwargs): | |
cmd = [] | |
for k, v in kwargs.items(): | |
short = len(k) == 1 | |
if short: | |
cmd.append('-' + k) | |
if v is not True: | |
cmd.append(v) | |
else: | |
if v is True: |
#!/usr/bin/env python | |
""" | |
james.py - Chief CLI. | |
USAGE: james.py ENV REF | |
ENV - Environment defined in the config file to deploy to. | |
REF - A git reference (like a SHA) to deploy. | |
Config: james.ini in the current directory should be an ini file with | |
one section per environment. Each environment should have a |
#!/bin/sh | |
# Import a (g|b)zipped SQL dump into a specified database through pipeviewer. | |
if [ $# -lt 2 ]; then | |
echo "USAGE: $0 <filename> <database>" | |
exit 1 | |
fi | |
EXT=${1/*./} |