Source code

Revision control

Copy as Markdown

Other Tools

# -*- Mode: python; indent-tabs-mode: nil; tab-width: 40 -*-
# vim: set filetype=python:
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at
option("--set-foo", help="set foo")
def foo(value):
if value:
return True
set_config("FOO", foo)
option("--set-bar", help="set bar")
def bar(value):
return bool(value)
set_config("BAR", bar)
option("--set-value", nargs=1, help="set value")
def set_value(value):
if value:
return value[0]
set_config("VALUE", set_value)
option("--set-name", nargs=1, help="set name")
def set_name(value):
if value:
return value[0]
set_config(set_name, True)