File: language_agnostic_testee.py

package info (click to toggle)
docopt 0.6.2-1~bpo70+1
  • links: PTS, VCS
  • area: main
  • in suites: wheezy-backports
  • size: 264 kB
  • sloc: python: 1,037; makefile: 32
file content (10 lines) | stat: -rwxr-xr-x 186 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
#! /usr/bin/env python
from docopt import docopt, DocoptExit
import sys, json

doc = sys.stdin.read()

try:
    print json.dumps(docopt(doc))
except DocoptExit:
    print '"user-error"'