Skip to content

Instantly share code, notes, and snippets.

View witsch's full-sized avatar
💭
204 No Content

Andreas Zeidler witsch

💭
204 No Content
View GitHub Profile
@witsch
witsch / formtest.py
Created February 27, 2012 22:14
dynamic forms on deform
from colander import MappingSchema, SchemaNode, String
from deform import Form
def magnet(schema):
def decorator(node):
for child in node().children:
schema.add(child)
return node
return decorator
@witsch
witsch / Makefile
Last active September 27, 2015 12:28
convenience Makefile for the "collective" Python buildout
# set up python buildout & development tools
version = 2.7
python = bin/python$(version)
defaults = bin/python bin/virtualenv
tools = buildout pep8 pyflakes mkrelease checkversions igor pytest tox devpi
namespace =
all: $(defaults) $(tools)
@witsch
witsch / pythontidy.xml
Created September 25, 2011 13:07
Configuration file for PythonTidy
<config>
<parm name="COL_LIMIT" value="int(79)" />
<parm name="SHEBANG" value="" />
<parm name="PARENTHESIZE_TUPLE_DISPLAY" value="bool(False)" />
<parm name="ADD_BLANK_LINES_AROUND_COMMENTS" value="bool(False)" />
<parm name="ADD_BLANK_LINE_AFTER_DOC_STRING" value="bool(False)" />
<parm name="MAX_SEPS_FUNC_DEF" value="int(99)" />
<parm name="MAX_SEPS_FUNC_REF" value="int(99)" />
<parm name="WRAP_DOC_STRINGS" value="bool(True)" />
<parm name="NORMALIZE_DOC_STRINGS" value="bool(True)" />
@witsch
witsch / .pdbrc
Created September 23, 2011 18:21
Previewing `browser.contents` in Pdb
# 'preview' support for browser tests
alias preview import os, tempfile; out = tempfile.NamedTemporaryFile(mode='w', suffix='.html'); print >> out, browser.contents; out.flush(); _ = os.system("open '%s'" % out.name)
First you want a version of `git` that comes with the bash completion script
installed. Of course, you could also download the `current version
<https://github.com/git/git/blob/master/contrib/completion/git-completion.bash>`_
and store it somewhere (e.g. in `~/.bash/`), but using the `git-core` port
from `MacPorts <http://www.macports.org/>`_ or a the binaries available at the
`Git home page <http://git-scm.com/>`_ has the advantage of (very likely)
giving you a more recent version. In the case of MacPorts_ you would run::
$ sudo port install git-core +bash_completion