2014/6/23 元記事: https://slack.zendesk.com/hc/en-us/articles/202518103-Restricted-Accounts-and-Single-Channel-Guest-FAQ
制限アカウントとシングルチャンネルゲスト FAQ Restricted Accounts and Single-Channel Guest FAQ
| from colander import MappingSchema, SchemaNode, String, Invalid | |
| import string | |
| def combined_validator(node, value): | |
| if value.get('name') != value.get('value'): | |
| raise Invalid(node, 'name and value must be identical. {!r}'.format(value)) | |
| class Schema1(MappingSchema): |
| vagrant@precise64:/tmp$ virtualenv venv | |
| New python executable in venv/bin/python2.7 | |
| Also creating executable in venv/bin/python | |
| Installing Setuptools..............................................................................................................................................................................................................................done. | |
| Installing Pip.....................................................................................................................................................................................................................................................................................................................................done. | |
| vagrant@precise64:/tmp$ cd venv/ | |
| vagrant@precise64:/tmp/venv$ git clone https://github.com/Pylons/substanced/ | |
| Cloning into 'substanced'... | |
| remote: Reusing existing pack: 17699, done. |
| import time | |
| import contextlib | |
| class TimeIt(object): | |
| def __init__(self): | |
| self._start = 0 | |
| self._end = 0 | |
| def begin(self): | |
| self._start = time.time() | |
| return self._start |
2014/6/23 元記事: https://slack.zendesk.com/hc/en-us/articles/202518103-Restricted-Accounts-and-Single-Channel-Guest-FAQ
制限アカウントとシングルチャンネルゲスト FAQ Restricted Accounts and Single-Channel Guest FAQ
PEP426: http://legacy.python.org/dev/peps/pep-0426/#environment-markers
$ pip install sphinx[intl]
| vagrant@precise64:/tmp/test$ make latexpdf SPHINXOPTS="-D language=it" | |
| sphinx-build -b latex -d _build/doctrees -D language=it . _build/latex//it | |
| Running Sphinx v1.2.3 | |
| loading translations [it]... done | |
| loading pickled environment... not yet created | |
| building [latex]: all documents | |
| updating environment: 1 added, 0 changed, 0 removed | |
| reading sources... [100%] index | |
| looking for now-outdated files... none found | |
| pickling environment... done |
| #!D:\venv\Scripts\python.exe | |
| # $Id: rst2html.py 4564 2006-05-21 20:44:42Z wiemann $ | |
| # Author: David Goodger <goodger@python.org> | |
| # Copyright: This module has been placed in the public domain. | |
| """ | |
| A minimal front end to the Docutils Publisher, producing HTML. | |
| """ |
ref: https://groups.google.com/d/msg/sphinx-users/qRHxPbgyKDI/1ZJBZY_ILhMJ
gist: https://gist.github.com/shimizukawa/37e26f6353327dad3f9d
archived: https://dl.dropboxusercontent.com/u/284189/sphinx-linkto-context-func.tgz
| # -*- coding: utf-8 -*- | |
| import sys | |
| import os | |
| sys.path.insert(0, os.path.abspath('.')) # directory path that contain 'foo.py' | |
| extensions = [ | |
| 'sphinx.ext.autodoc', | |
| ] |