AOT: Abstract Object Trees
The source-code-marshallin'est abstract-object-serializin'est persister
this side of Marmalade!
Imported modules
|
|
import copy_reg
import new
import string
from twisted.persisted import crefutil
from twisted.python import reflect
import types
|
Functions
|
|
dictToKW
getSource
indentify
jellyToAOT
jellyToSource
prettify
unjellyFromAOT
unjellyFromSource
|
|
dictToKW
|
dictToKW ( d )
|
|
getSource
|
getSource ( ao )
Pass me an AO, I'll return a nicely-formatted source representation.
|
|
indentify
|
indentify ( s )
|
|
jellyToAOT
|
jellyToAOT ( obj )
Convert an object to an Abstract Object Tree.
|
|
jellyToSource
|
jellyToSource ( obj, file=None )
Pass me an object and, optionally, a file object.
I'll convert the object to an AOT either return it (if no file was
specified) or write it to the file.
|
|
prettify
|
prettify ( obj )
Exceptions
|
|
TypeError("Unsupported type %s when trying to prettify %s." %( t, obj ) )
|
|
|
unjellyFromAOT
|
unjellyFromAOT ( aot )
Pass me an Abstract Object Tree, and I'll unjelly it for you.
|
|
unjellyFromSource
|
unjellyFromSource ( stringOrFile )
Pass me a string of code or a filename that defines an app variable (in
terms of Abstract Objects!), and I'll execute it and unjelly the resulting
AOT for you, returning a newly unpersisted Application object!
Exceptions
|
|
ValueError( "%s needs to define an 'app', it didn't!" % stringOrFile )
|
|
Classes
|
|
|