source: trunk/packages/pyyaml/lib/yaml/cyaml.py @ 1115

Last change on this file since 1115 was 898, checked in by hartmans, 16 years ago

Add pyyaml and libyaml packages
backported from lenny.
There is discussion about how these should go in the repository; these are added in this form
in order to make forward progress.

File size: 3.2 KB
RevLine 
[898]1
2__all__ = ['CBaseLoader', 'CSafeLoader', 'CLoader',
3        'CBaseDumper', 'CSafeDumper', 'CDumper']
4
5from _yaml import CParser, CEmitter
6
7from constructor import *
8
9from serializer import *
10from representer import *
11
12from resolver import *
13
14class CBaseLoader(CParser, BaseConstructor, BaseResolver):
15
16    def __init__(self, stream):
17        CParser.__init__(self, stream)
18        BaseConstructor.__init__(self)
19        BaseResolver.__init__(self)
20
21class CSafeLoader(CParser, SafeConstructor, Resolver):
22
23    def __init__(self, stream):
24        CParser.__init__(self, stream)
25        SafeConstructor.__init__(self)
26        Resolver.__init__(self)
27
28class CLoader(CParser, Constructor, Resolver):
29
30    def __init__(self, stream):
31        CParser.__init__(self, stream)
32        Constructor.__init__(self)
33        Resolver.__init__(self)
34
35class CBaseDumper(CEmitter, BaseRepresenter, BaseResolver):
36
37    def __init__(self, stream,
38            default_style=None, default_flow_style=None,
39            canonical=None, indent=None, width=None,
40            allow_unicode=None, line_break=None,
41            encoding=None, explicit_start=None, explicit_end=None,
42            version=None, tags=None):
43        CEmitter.__init__(self, stream, canonical=canonical,
44                indent=indent, width=width,
45                allow_unicode=allow_unicode, line_break=line_break,
46                explicit_start=explicit_start, explicit_end=explicit_end,
47                version=version, tags=tags)
48        Representer.__init__(self, default_style=default_style,
49                default_flow_style=default_flow_style)
50        Resolver.__init__(self)
51
52class CSafeDumper(CEmitter, SafeRepresenter, Resolver):
53
54    def __init__(self, stream,
55            default_style=None, default_flow_style=None,
56            canonical=None, indent=None, width=None,
57            allow_unicode=None, line_break=None,
58            encoding=None, explicit_start=None, explicit_end=None,
59            version=None, tags=None):
60        CEmitter.__init__(self, stream, canonical=canonical,
61                indent=indent, width=width,
62                allow_unicode=allow_unicode, line_break=line_break,
63                explicit_start=explicit_start, explicit_end=explicit_end,
64                version=version, tags=tags)
65        SafeRepresenter.__init__(self, default_style=default_style,
66                default_flow_style=default_flow_style)
67        Resolver.__init__(self)
68
69class CDumper(CEmitter, Serializer, Representer, Resolver):
70
71    def __init__(self, stream,
72            default_style=None, default_flow_style=None,
73            canonical=None, indent=None, width=None,
74            allow_unicode=None, line_break=None,
75            encoding=None, explicit_start=None, explicit_end=None,
76            version=None, tags=None):
77        CEmitter.__init__(self, stream, canonical=canonical,
78                indent=indent, width=width,
79                allow_unicode=allow_unicode, line_break=line_break,
80                explicit_start=explicit_start, explicit_end=explicit_end,
81                version=version, tags=tags)
82        Representer.__init__(self, default_style=default_style,
83                default_flow_style=default_flow_style)
84        Resolver.__init__(self)
85
Note: See TracBrowser for help on using the repository browser.