Table of Contents

Class: PseudoModule em.py

A pseudomodule for the builtin EmPy routines.

Methods   
__init__
addHook
areHooksEnabled
assign
atExit
atomic
attachFilter
clearGlobals
clearHooks
createDiversion
defined
disableHooks
enableHooks
escape
evaluate
execute
expand
flatten
flush
getAllDiversions
getCurrentDiversion
getFilter
getGlobals
getHooks
getPrefix
identify
import_
include
invokeHook
nullFilter
playAllDiversions
playDiversion
popContext
purgeAllDiversions
purgeDiversion
pushContext
quote
removeHook
replayAllDiversions
replayDiversion
resetFilter
restoreGlobals
retrieveDiversion
saveGlobals
serialize
setContextLine
setContextName
setFilter
setGlobals
setPrefix
significate
single
startDiversion
stopDiverting
string
updateGlobals
  __init__ 
__init__ (
        self,
        interpreter,
        name,
        )

  addHook 
addHook (
        self,
        hook,
        prepend=False,
        )

Add a new hook; optionally insert it rather than appending it.

  areHooksEnabled 
areHooksEnabled ( self )

Return whether or not hooks are presently enabled.

  assign 
assign (
        self,
        name,
        value,
        locals=None,
        )

Do a variable assignment, including possible tuple unpacking. Name is a string (representing a name or a sequence of names separated by commas, and value is a Python object (a sequence of the same length if name contains commas).

  atExit 
atExit ( self,  callable )

Register a function to be called at exit.

  atomic 
atomic (
        self,
        name,
        value,
        locals=None,
        )

Do an atomic variable assignment; no tuple unpacking here. Note that name is a string but value is a Python object, not a string to be evaluated.

  attachFilter 
attachFilter ( self,  shortcut )

Attach a single filter to the end of the current filter chain.

  clearGlobals 
clearGlobals ( self )

Clear out the globals with a brand new dictionary.

  clearHooks 
clearHooks ( self )

Clear all hooks.

  createDiversion 
createDiversion ( self,  name )

Create a diversion (but do not divert to it) if it does not already exist.

  defined 
defined (
        self,
        name,
        locals=None,
        )

Determine whether name appears in the locals or globals.

  disableHooks 
disableHooks ( self )

Disable hooks.

  enableHooks 
enableHooks ( self )

Enable hooks.

  escape 
escape (
        self,
        data,
        more='',
        )

Escape a string so that nonprintable characters are replaced with compatible EmPy expansions.

  evaluate 
evaluate (
        self,
        expression,
        locals=None,
        )

Evaluate the expression.

  execute 
execute (
        self,
        statements,
        locals=None,
        )

Execute the statement(s).

  expand 
expand (
        self,
        data,
        locals=None,
        )

Do an explicit expansion and return its results as a string.

  flatten 
flatten ( self,  keys=None )

Flatten the contents of the pseudo-module into the globals namespace.

  flush 
flush ( self )

Do a manual flush of the underlying stream.

  getAllDiversions 
getAllDiversions ( self )

Get the names of all existing diversions.

  getCurrentDiversion 
getCurrentDiversion ( self )

Get the name of the current diversion.

  getFilter 
getFilter ( self )

Get the current filter.

  getGlobals 
getGlobals ( self )

Retrieve the globals.

  getHooks 
getHooks ( self )

Get the current hooks.

  getPrefix 
getPrefix ( self )

Get the current prefix.

  identify 
identify ( self )

Identify the topmost context with a 2-tuple of the name and line number.

  import_ 
import_ (
        self,
        name,
        locals=None,
        )

Do a Python import.

  include 
include (
        self,
        fileOrFilename,
        locals=None,
        )

Include a file by filename (if a string) or treat the object as a file-like object directly.

  invokeHook 
invokeHook (
        self,
        _name,
        **keywords,
        )

Manually invoke a hook.

  nullFilter 
nullFilter ( self )

Install a filter that will consume all text.

  playAllDiversions 
playAllDiversions ( self )

Play all existing diversions and then purge them.

  playDiversion 
playDiversion ( self,  name )

Play the given diversion and then purge it.

  popContext 
popContext ( self )

Pop the top context.

  purgeAllDiversions 
purgeAllDiversions ( self )

Purge all existing diversions.

  purgeDiversion 
purgeDiversion ( self,  name )

Eliminate the given diversion.

  pushContext 
pushContext (
        self,
        name='<unnamed>',
        line=0,
        )

Create a new context and push it.

  quote 
quote ( self,  data )

Quote the given string so that if expanded by EmPy it would evaluate to the original.

  removeHook 
removeHook ( self,  hook )

Remove a preexisting hook.

  replayAllDiversions 
replayAllDiversions ( self )

Replay all existing diversions without purging them.

  replayDiversion 
replayDiversion ( self,  name )

Replay the diversion without purging it.

  resetFilter 
resetFilter ( self )

Reset the filter so that it does no filtering.

  restoreGlobals 
restoreGlobals ( self,  destructive=True )

Restore the most recently saved copy of the globals.

  retrieveDiversion 
retrieveDiversion ( self,  name )

Retrieve the diversion object associated with the name.

  saveGlobals 
saveGlobals ( self,  deep=True )

Save a copy of the globals off onto the history stack.

  serialize 
serialize (
        self,
        expression,
        locals=None,
        )

Evaluate the expression, serialize it, and write it out to the stream, if it is not None.

  setContextLine 
setContextLine ( self,  line )

Set the name of the topmost context.

  setContextName 
setContextName ( self,  name )

Set the name of the topmost context.

  setFilter 
setFilter ( self,  shortcut )

Set the filter.

  setGlobals 
setGlobals ( self,  globals )

Set the globals to the specified dictionary.

  setPrefix 
setPrefix ( self,  prefix )

Set the prefix.

  significate 
significate (
        self,
        key,
        value=None,
        locals=None,
        )

Do a direct signification.

  single 
single (
        self,
        source,
        locals=None,
        )

Interpret a single code fragment just as the Python interactive interpreter would.

  startDiversion 
startDiversion ( self,  name )

Start diverting to the given diversion name.

  stopDiverting 
stopDiverting ( self )

Stop any diverting.

  string 
string (
        self,
        data,
        name='<string>',
        locals=None,
        )

Forcibly evaluate an EmPy string.

  updateGlobals 
updateGlobals ( self,  otherGlobals )

Merge another mapping object into this interpreter's globals.


Table of Contents

This document was automatically generated on Tue Oct 7 21:44:41 2003 by HappyDoc version 2.1