Table of Contents

Module: em em.py

A system for processing Python as markup embedded in text.

Imported modules   
import copy
import getopt
import os
import re
import string
import sys
import types
Functions   
environment
expand
info
invoke
main
usage
  environment 
environment ( name,  default=None )

Get data from the current environment. If the default is True or False, then presume that we're only interested in the existence or non-existence of the environment variable.

  expand 
expand (
        _data,
        _globals=None,
        _argv=None,
        _prefix=DEFAULT_PREFIX,
        _pseudo=None,
        _options=None,
        **_locals,
        )

Do an atomic expansion of the given source data, creating and shutting down an interpreter dedicated to the task. The sys.stdout object is saved off and then replaced before this function returns.

  info 
info ( table )

  invoke 
invoke ( args )

Run a standalone instance of an EmPy interpeter.

Exceptions   
Error, "prefix must be single-character string"
ValueError, "-b only makes sense with -o or -a arguments"
  main 
main ()

  usage 
usage ( verbose=True )

Print usage information.

Classes   

AbstractFile

An abstracted file that, when buffered, will totally buffer the

BreakFlow

A break control flow.

BufferedFilter

A buffered filter is one that doesn't modify the source data

CommentToken

A comment markup.

Context

An interpreter context, which encapsulates a name, an input

ContextLineToken

A context line change markup.

ContextNameToken

A context name change markup.

ContinueFlow

A continue control flow.

ControlToken

A control token.

CustomToken

A custom markup.

Diversion

The representation of an active diversion. Diversions act as

DiversionError

An error related to diversions.

Document

A representation of an individual EmPy document, as used by a

Error

The base class for all EmPy errors.

EscapeToken

An escape markup.

ExpansionToken

A token that involves an expansion.

ExpressionToken

An expression markup.

Filter

An abstract filter.

FilterError

An error related to filters.

FlowError

An exception related to control flow.

FunctionFilter

A filter that works simply by pumping its input through a

Hook

The base class for implementing hooks.

InPlaceToken

An in-place markup.

Interpreter

An interpreter can process chunks of EmPy code.

LineBufferedFilter

A line-buffered filter only lets data through when it sees

LiteralToken

A literal markup.

MaximallyBufferedFilter

A maximally-buffered filter only lets its data through on the final

MetaError

A wrapper around a real Python exception for including a copy of

NullFile

A simple class that supports all the file-like object methods

NullFilter

A filter that never sends any output to its sink.

NullToken

A chunk of data not containing markups.

ParseError

A parse error occurred.

PrefixToken

A prefix markup.

Processor

An entity which is capable of processing a hierarchy of EmPy

ProxyFile

The proxy file object that is intended to take the place of

ReprToken

A repr markup.

Scanner

A scanner holds a buffer for lookahead parsing and has the

SignificatorToken

A significator markup.

SimpleExpressionToken

A simple expression markup.

SizeBufferedFilter

A size-buffered filter only in fixed size chunks (excepting the

Stack

A simple stack that behaves as a sequence (with 0 being the top

StackUnderflowError

A stack underflow.

StatementToken

A statement markup.

Stream

A wrapper around an (output) file object which supports

StringFilter

A filter that takes a translation string (256 characters) and

StringLiteralToken

A string token markup.

Subsystem

The subsystem class defers file creation so that it can create

SubsystemError

An error associated with the Unicode subsystem.

Token

An element of expansion.

TransientParseError

A parse error occurred which may be resolved by feeding more data.

UncloseableFile

A simple class which wraps around a delegate file-like object

VerboseHook

A verbose hook that reports all information received by the

WhitespaceToken

A whitespace markup.


Table of Contents

This document was automatically generated on Mon Oct 27 01:29:13 2003 by HappyDoc version 2.1