simudo.pyaml package

Submodules

simudo.pyaml.astglobals module

simudo.pyaml.astglobals.find_globals(ast_tree)[source]

Returns a set of all global variable names referenced in the code.

Warning: does not yet work properly on classes.

exception simudo.pyaml.astglobals.FindFreeVariablesClassWarning[source]

Bases: UserWarning

simudo.pyaml.helper module

class simudo.pyaml.helper.PyamlBase[source]

Bases: simudo.pyaml.helper.PyamlEnv, simudo.pyaml.helper.PyamlGetAttr

class simudo.pyaml.helper.PyamlEnv[source]

Bases: object

PYAML_get_direct_env(env, name, globals)[source]
PYAML_get_env(env, name, globals)[source]

get name from environment env, or else look it up in globals

class simudo.pyaml.helper.PyamlGetAttr[source]

Bases: object

PYAML_EVAL(name)[source]

simudo.pyaml.load module

simudo.pyaml.multidict module

class simudo.pyaml.multidict.EscapeMultidictKey(*args, **kwargs)[source]

Bases: generic_escape.GenericEscape

escaped = {'@': '\\\\@', '\\': '\\\\'}
simudo.pyaml.multidict.multidict_items(mapping)[source]

simudo.pyaml.pyaml1 module

class simudo.pyaml.pyaml1.BaseCustomTag[source]

Bases: object

classmethod from_yaml(loader, node)[source]
classmethod register_in_dumper(dumper)[source]
classmethod register_in_loader(loader)[source]
classmethod to_yaml(dumper, data)[source]
yaml_classes = ()
yaml_tag = None
class simudo.pyaml.pyaml1.CodeGenerator[source]

Bases: object

YAMLLoader

alias of XLoader

as_isolated_method_in_module(preamble, code)[source]
depth = 0
emit(line)[source]
emit_eval_auto_call(name, codetag)[source]
emit_str(text)[source]
get_current_indent()[source]
indent_spaces = 2
process(yaml_tree)[source]
process_class(name, tree)[source]
process_code(name, codetag, prefix='')[source]
process_eval(destination_prefix, lookup_prefix, tree)[source]
classmethod pyaml_to_python(tree=None, stream=None)[source]

use this method!

result
class simudo.pyaml.pyaml1.CodeTag(dict)[source]

Bases: simudo.pyaml.pyaml1.InitKwSetattr

auto_cache = True
code = None
env = 'default'
class simudo.pyaml.pyaml1.InitKwSetattr(dict)[source]

Bases: object

class simudo.pyaml.pyaml1.XLoader(*args, **kwargs)[source]

Bases: yamlordereddictloader.Loader

yaml_constructors = {'tag:yaml.org,2002:null': <function SafeConstructor.construct_yaml_null>, 'tag:yaml.org,2002:bool': <function SafeConstructor.construct_yaml_bool>, 'tag:yaml.org,2002:int': <function SafeConstructor.construct_yaml_int>, 'tag:yaml.org,2002:float': <function SafeConstructor.construct_yaml_float>, 'tag:yaml.org,2002:binary': <function SafeConstructor.construct_yaml_binary>, 'tag:yaml.org,2002:timestamp': <function SafeConstructor.construct_yaml_timestamp>, 'tag:yaml.org,2002:omap': <function construct_yaml_map>, 'tag:yaml.org,2002:pairs': <function SafeConstructor.construct_yaml_pairs>, 'tag:yaml.org,2002:set': <function SafeConstructor.construct_yaml_set>, 'tag:yaml.org,2002:str': <function SafeConstructor.construct_yaml_str>, 'tag:yaml.org,2002:seq': <function SafeConstructor.construct_yaml_seq>, 'tag:yaml.org,2002:map': <function construct_yaml_map>, None: <function SafeConstructor.construct_undefined>, 'tag:yaml.org,2002:python/none': <function SafeConstructor.construct_yaml_null>, 'tag:yaml.org,2002:python/bool': <function SafeConstructor.construct_yaml_bool>, 'tag:yaml.org,2002:python/str': <function Constructor.construct_python_str>, 'tag:yaml.org,2002:python/unicode': <function Constructor.construct_python_unicode>, 'tag:yaml.org,2002:python/bytes': <function Constructor.construct_python_bytes>, 'tag:yaml.org,2002:python/int': <function SafeConstructor.construct_yaml_int>, 'tag:yaml.org,2002:python/long': <function Constructor.construct_python_long>, 'tag:yaml.org,2002:python/float': <function SafeConstructor.construct_yaml_float>, 'tag:yaml.org,2002:python/complex': <function Constructor.construct_python_complex>, 'tag:yaml.org,2002:python/list': <function SafeConstructor.construct_yaml_seq>, 'tag:yaml.org,2002:python/tuple': <function Constructor.construct_python_tuple>, 'tag:yaml.org,2002:python/dict': <function SafeConstructor.construct_yaml_map>, '!c': <bound method YCodeTag.from_yaml of <class 'simudo.pyaml.pyaml1.YCodeTag'>>, '!c2': <bound method YCode2Tag.from_yaml of <class 'simudo.pyaml.pyaml1.YCode2Tag'>>}
class simudo.pyaml.pyaml1.YCode2Tag[source]

Bases: simudo.pyaml.pyaml1.BaseCustomTag

classmethod from_yaml(loader, node)[source]
yaml_tag = '!c2'
class simudo.pyaml.pyaml1.YCodeTag[source]

Bases: simudo.pyaml.pyaml1.BaseCustomTag

classmethod from_yaml(loader, node)[source]
yaml_tag = '!c'
simudo.pyaml.pyaml1.kl

alias of simudo.pyaml.pyaml1.YCode2Tag

Module contents