em

A system for processing Python via markup embeded in text.

Functions

details(level[, config, prelim, postlim, file])

Write some details, using the details subsystem if available.

expand(data[, _globals, _argv, _prefix, ...])

Do a self-contained expansion of the given source data, creating and shutting down an interpreter dedicated to the task.

invoke(args, **kwargs)

Run a standalone instance of an EmPy interpreter with the given command line arguments.

isIdentifier(string[, first])

Is this string a valid identifier? If first is true, make sure the first character is a valid starting identifier character.

main()

toString(value)

Convert value to a (Unicode) string.

uliteral(i)

Return a wide Unicode string literal.

Classes

BackquoteToken(current, config, first)

A backquote markup: @`...`

CodedToken(current, config, first)

The abstract base class for a token that supports codings.

Command(noun)

A generic high-level processing command.

CommentToken(current, config, first)

The abstract base class for the comment tokens.

Configuration(**kwargs)

The configuration encapsulates all the defaults and parameterized behavior of an interpreter.

Context(name, line, column[, chars, ...])

A simple interpreter context, storing only the current data.

ContextLineToken(current, config, first)

A context line change markup: @!...

ContextNameToken(current, config, first)

A context name change markup: @?...

ContextToken(current, config, first)

A base class for the context tokens.

ControlToken(current, config, first)

A control markup: @[...]

Core(**kwargs)

A core encapsulates the functionality of the underlying language (Python by default).

DefineCommand(noun)

Define a Python variable.

DelegatingFile(delegate)

A simple class which wraps around a delegate file-like object and lets everything through.

DiacriticToken(current, config, first)

A diacritic markup: @^...

DisableToken(current, config, first)

An disable output markup: ``@- .

Diversion(name)

The representation of an active diversion.

DocumentCommand(noun)

Read and execute an EmPy document.

EmojiModuleInfo(name, attribute, format, ...)

The abstraction of an emoji module that may or may not be available for usage.

EmojiToken(current, config, first)

An emoji markup: @:...:

EnableToken(current, config, first)

An enable output markup: ``@+ .

EscapeToken(current, config, first)

An escape markup: @\...

ExecCommand

alias of ExecuteCommand

ExecuteCommand(noun)

Execute a Python statement.

ExecutionToken(current, config, first)

The abstract base class for execution tokens (expressions, statements, controls, etc.)

ExpandCommand(noun)

Execute a Python statement.

ExpansionToken(current, config, first)

A token that involves an expansion.

ExpressionToken(current, config, first)

An expression markup: @(...)

Extension([mapping])

An extension plugin that the interpreter will defer to for non-standard markup.

ExtensionToken(current, config, first)

An extension markup, used for all customizable markup: @((...)), @[[...]], @{{...}}, @<...>, etc.

Factory(tokens)

Turn a first character sequence into a token class.

File()

An abstract filelike object.

FileCommand(noun)

Load an execute a Python file.

IconToken(current, config, first)

An icon markup: @|...

ImportCommand(noun)

Import a Python module.

InPlaceToken(current, config, first)

An in-place markup: @$...$...$

InlineCommentToken(current, config, first)

An inline comment markup: ``@* .

Interpreter(**kwargs)

An interpreter can process chunks of EmPy code.

LineCommentToken(current, config, first)

A line comment markup: ``@# .

LiteralToken(current, config, first)

The abstract base class of the literal tokens.

Module

alias of EmojiModuleInfo

NullFile()

A simple class that supports all the file-like object methods but simply does nothing at all.

Plugin()

A plugin is an object owned by an interpreter that has a back-reference to it.

PrefixToken(current, config, first)

A prefix markup: @@

ProxyFile(bottom[, wrapper])

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

Root()

The root class of all EmPy class hierarchies.

Scanner(config, context, currents[, data])

A scanner holds a buffer for lookahead parsing and has the ability to scan for special symbols and indicators in that buffer.

SignificatorToken(current, config, first)

A significator markup: ``@%.

SimpleExpressionToken(current, config, first)

A simple expression markup: @x, @x.y, @x(y), @x[y], @f{...}

Stack([seq])

A simple stack that is implemented as a sequence.

StatementToken(current, config, first)

A statement markup: @{...}

Stream(interp, file, diversions)

A wrapper around an (output) file object which supports diversions and filtering.

StringCommand(noun)

Define a Python string variable.

StringToken(current, config, first)

A string token markup: @'...', @'''...''', @"...", @"""..."""

SwitchToken(current, config, first)

Base class for the enable/disable tokens.

TextToken(current, data)

A chunk of text not containing markups.

Token(current)

An element resulting from parsing.

UncloseableFile(delegate)

A delegating file class that lets through everything except close calls, which it turns into a flush.

Version()

An enumerated type representing version detail levels.

WhitespaceToken(current, config, first)

A whitespace markup: @ WS

Exceptions

BreakFlow

CompatibilityError(*args, **kwargs)

ConfigurationError(*args, **kwargs)

ConfigurationFileNotFoundError(*args, **kwargs)

ConsistencyError(*args, **kwargs)

ContinueFlow

CoreError(*args, **kwargs)

DiversionError(*args, **kwargs)

Error(*args, **kwargs)

ExtensionError(*args, **kwargs)

FilterError(*args, **kwargs)

Flow

InvocationError(*args, **kwargs)

ParseError(*args, **kwargs)

StackUnderflowError(*args, **kwargs)

StringError(*args, **kwargs)

TransientParseError(*args, **kwargs)

UnknownEmojiError(*args, **kwargs)