diff options
author | xi <xi@18f92427-320e-0410-9341-c67f048884a3> | 2008-12-29 17:24:05 +0000 |
---|---|---|
committer | xi <xi@18f92427-320e-0410-9341-c67f048884a3> | 2008-12-29 17:24:05 +0000 |
commit | 0dfeb9f5f403658a12a0305d1cf2ff54ccb88f20 (patch) | |
tree | 9f53c734a8aaa6305ebcbb526a990f207d978302 /lib3/yaml/dumper.py | |
parent | 26fa005de84c1a760ed94a80866ddb1d6eb74f3c (diff) | |
download | pyyaml-0dfeb9f5f403658a12a0305d1cf2ff54ccb88f20.tar.gz |
Added basic support for Python 3 (Thanks idadesub(at)users(dot)sourceforge(dot)net).
git-svn-id: http://svn.pyyaml.org/pyyaml/trunk@328 18f92427-320e-0410-9341-c67f048884a3
Diffstat (limited to 'lib3/yaml/dumper.py')
-rw-r--r-- | lib3/yaml/dumper.py | 62 |
1 files changed, 62 insertions, 0 deletions
diff --git a/lib3/yaml/dumper.py b/lib3/yaml/dumper.py new file mode 100644 index 0000000..0b69128 --- /dev/null +++ b/lib3/yaml/dumper.py @@ -0,0 +1,62 @@ + +__all__ = ['BaseDumper', 'SafeDumper', 'Dumper'] + +from .emitter import * +from .serializer import * +from .representer import * +from .resolver import * + +class BaseDumper(Emitter, Serializer, BaseRepresenter, BaseResolver): + + def __init__(self, stream, + default_style=None, default_flow_style=None, + canonical=None, indent=None, width=None, + allow_unicode=None, line_break=None, + encoding=None, explicit_start=None, explicit_end=None, + version=None, tags=None): + Emitter.__init__(self, stream, canonical=canonical, + indent=indent, width=width, + allow_unicode=allow_unicode, line_break=line_break) + Serializer.__init__(self, encoding=encoding, + explicit_start=explicit_start, explicit_end=explicit_end, + version=version, tags=tags) + Representer.__init__(self, default_style=default_style, + default_flow_style=default_flow_style) + Resolver.__init__(self) + +class SafeDumper(Emitter, Serializer, SafeRepresenter, Resolver): + + def __init__(self, stream, + default_style=None, default_flow_style=None, + canonical=None, indent=None, width=None, + allow_unicode=None, line_break=None, + encoding=None, explicit_start=None, explicit_end=None, + version=None, tags=None): + Emitter.__init__(self, stream, canonical=canonical, + indent=indent, width=width, + allow_unicode=allow_unicode, line_break=line_break) + Serializer.__init__(self, encoding=encoding, + explicit_start=explicit_start, explicit_end=explicit_end, + version=version, tags=tags) + SafeRepresenter.__init__(self, default_style=default_style, + default_flow_style=default_flow_style) + Resolver.__init__(self) + +class Dumper(Emitter, Serializer, Representer, Resolver): + + def __init__(self, stream, + default_style=None, default_flow_style=None, + canonical=None, indent=None, width=None, + allow_unicode=None, line_break=None, + encoding=None, explicit_start=None, explicit_end=None, + version=None, tags=None): + Emitter.__init__(self, stream, canonical=canonical, + indent=indent, width=width, + allow_unicode=allow_unicode, line_break=line_break) + Serializer.__init__(self, encoding=encoding, + explicit_start=explicit_start, explicit_end=explicit_end, + version=version, tags=tags) + Representer.__init__(self, default_style=default_style, + default_flow_style=default_flow_style) + Resolver.__init__(self) + |