1 | |
---|
2 | __all__ = ['CBaseLoader', 'CSafeLoader', 'CLoader', |
---|
3 | 'CBaseDumper', 'CSafeDumper', 'CDumper'] |
---|
4 | |
---|
5 | from _yaml import CParser, CEmitter |
---|
6 | |
---|
7 | from constructor import * |
---|
8 | |
---|
9 | from serializer import * |
---|
10 | from representer import * |
---|
11 | |
---|
12 | from resolver import * |
---|
13 | |
---|
14 | class CBaseLoader(CParser, BaseConstructor, BaseResolver): |
---|
15 | |
---|
16 | def __init__(self, stream): |
---|
17 | CParser.__init__(self, stream) |
---|
18 | BaseConstructor.__init__(self) |
---|
19 | BaseResolver.__init__(self) |
---|
20 | |
---|
21 | class CSafeLoader(CParser, SafeConstructor, Resolver): |
---|
22 | |
---|
23 | def __init__(self, stream): |
---|
24 | CParser.__init__(self, stream) |
---|
25 | SafeConstructor.__init__(self) |
---|
26 | Resolver.__init__(self) |
---|
27 | |
---|
28 | class CLoader(CParser, Constructor, Resolver): |
---|
29 | |
---|
30 | def __init__(self, stream): |
---|
31 | CParser.__init__(self, stream) |
---|
32 | Constructor.__init__(self) |
---|
33 | Resolver.__init__(self) |
---|
34 | |
---|
35 | class 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 | |
---|
52 | class 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 | |
---|
69 | class 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 | |
---|