source: rtems-libbsd/waf_generator.py @ f1fcdba

55-freebsd-126-freebsd-12freebsd-9.3
Last change on this file since f1fcdba was f1fcdba, checked in by Chris Johns <chrisj@…>, on 04/27/16 at 02:03:17

waf: Refector the builder to work with Python3 and UTF-8 source files.

Python 3 requires better UTF-8 handling of files and FreeBSD has UTF-8
characters in some files.

Refactor builder.py to clean up the code and remove the need to have
a temporary file. Update other scripts to use the new code.

  • Property mode set to 100755
File size: 23.8 KB
Line 
1#
2#  Copyright (c) 2015-2016 Chris Johns <chrisj@rtems.org>. All rights reserved.
3#
4#  Copyright (c) 2009-2015 embedded brains GmbH.  All rights reserved.
5#
6#   embedded brains GmbH
7#   Dornierstr. 4
8#   82178 Puchheim
9#   Germany
10#   <info@embedded-brains.de>
11#
12#  Copyright (c) 2012 OAR Corporation. All rights reserved.
13#
14#  Redistribution and use in source and binary forms, with or without
15#  modification, are permitted provided that the following conditions
16#  are met:
17#  1. Redistributions of source code must retain the above copyright
18#     notice, this list of conditions and the following disclaimer.
19#  2. Redistributions in binary form must reproduce the above copyright
20#     notice, this list of conditions and the following disclaimer in the
21#     documentation and/or other materials provided with the distribution.
22#
23#  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
24#  "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
25#  LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
26#  A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
27#  OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
28#  SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
29#  LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
30#  DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
31#  THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
32#  (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
33#  OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
34
35from __future__ import print_function
36
37import os
38import sys
39import tempfile
40
41import builder
42
43trace = False
44
45data = { }
46
47def _add_files(name, files):
48    if type(files) is not list:
49        files = [files]
50    if name not in data:
51        data[name] = []
52    data[name] += files
53
54def _clfags_includes(cflags, includes):
55    if type(cflags) is not list:
56        if cflags is not None:
57            _cflags = cflags.split(' ')
58        else:
59            _cflags = [None]
60    else:
61        _cflags = cflags
62    if type(includes) is not list:
63        _includes = [includes]
64    else:
65        _includes = includes
66    return _cflags, _includes
67
68class SourceFileFragmentComposer(builder.BuildSystemFragmentComposer):
69
70    def __init__(self, cflags = "default", includes = None):
71        self.cflags, self.includes = _clfags_includes(cflags, includes)
72
73    def compose(self, path):
74        if None in self.includes:
75            return ['sources', self.cflags], [path], self.cflags, self.includes
76        return ['sources', self.cflags + self.includes], [path], self.cflags, self.includes
77
78class TestFragementComposer(builder.BuildSystemFragmentComposer):
79
80    def __init__(self, testName, fileFragments, runTest = True, netTest = False):
81        self.testName = testName
82        self.fileFragments = fileFragments
83        self.runTest = runTest
84        self.netTest = netTest
85
86    def compose(self, path):
87        return ['tests', self.testName], { 'files': self.fileFragments,
88                                           'run': self.runTest,
89                                           'net': self.netTest }
90
91class KVMSymbolsFragmentComposer(builder.BuildSystemFragmentComposer):
92
93    def compose(self, path):
94        return ['KVMSymbols', 'files'], [path], self.includes
95
96class RPCGENFragmentComposer(builder.BuildSystemFragmentComposer):
97
98    def compose(self, path):
99        return ['RPCGen', 'files'], [path]
100
101class RouteKeywordsFragmentComposer(builder.BuildSystemFragmentComposer):
102
103    def compose(self, path):
104        return ['RouteKeywords', 'files'], [path]
105
106class LexFragmentComposer(builder.BuildSystemFragmentComposer):
107
108    def __init__(self, sym, dep, cflags = None, includes = None):
109        self.sym = sym
110        self.dep = dep
111        self.cflags, self.includes = _clfags_includes(cflags, includes)
112
113    def compose(self, path):
114        d = { 'file': path,
115              'sym': self.sym,
116              'dep': self.dep }
117        if None not in self.cflags:
118            d['cflags'] = self.cflags
119        if None not in self.includes:
120            d['includes'] = self.includes
121        return ['lex', path], d
122
123class YaccFragmentComposer(builder.BuildSystemFragmentComposer):
124
125    def __init__(self, sym, header, cflags = None, includes = None):
126        self.sym = sym
127        self.header = header
128        self.cflags, self.includes = _clfags_includes(cflags, includes)
129
130    def compose(self, path):
131        d = { 'file': path,
132              'sym': self.sym,
133              'header': self.header }
134        if None not in self.cflags:
135            d['cflags'] = self.cflags
136        if None not in self.includes:
137            d['includes'] = self.includes
138        return ['yacc', path], d
139
140# Module Manager - Collection of Modules
141class ModuleManager(builder.ModuleManager):
142
143    def restart(self):
144        self.script = ''
145
146    def add(self, line = ''):
147        self.script += line + os.linesep
148
149    def write(self):
150        name = os.path.join(builder.RTEMS_DIR, 'libbsd_waf.py')
151        converter = builder.Converter()
152        converter.convert(name, name, src_contents = self.script)
153
154    def setGenerators(self):
155        self.generator['convert'] = builder.Converter
156        self.generator['no-convert'] = builder.NoConverter
157
158        self.generator['file'] = builder.File
159
160        self.generator['path'] = builder.PathComposer
161        self.generator['freebsd-path'] = builder.FreeBSDPathComposer
162        self.generator['rtems-path'] = builder.RTEMSPathComposer
163        self.generator['cpu-path'] = builder.CPUDependentPathComposer
164        self.generator['target-src-cpu--path'] = builder.TargetSourceCPUDependentPathComposer
165
166        self.generator['source'] = SourceFileFragmentComposer
167        self.generator['test'] = TestFragementComposer
168        self.generator['kvm-symbols'] = KVMSymbolsFragmentComposer
169        self.generator['rpc-gen'] = RPCGENFragmentComposer
170        self.generator['route-keywords'] = RouteKeywordsFragmentComposer
171        self.generator['lex'] = LexFragmentComposer
172        self.generator['yacc'] = YaccFragmentComposer
173
174    def generate(self, rtems_version):
175
176        def _source_list(lhs, files, append = False):
177            if append:
178                adder = '+'
179                adder_space = ' '
180            else:
181                adder = ''
182                adder_space = ''
183            ll = len(lhs)
184            if len(files) == 1:
185                self.add('%s %s= [%r]' % (lhs, adder, files[0]))
186            elif len(files) == 2:
187                self.add('%s %s= [%r,' % (lhs, adder, files[0]))
188                self.add('%s %s   %r]' % (' ' * ll, adder_space, files[-1]))
189            elif len(files) > 0:
190                self.add('%s %s= [%r,' % (lhs, adder, files[0]))
191                for f in files[1:-1]:
192                    self.add('%s %s   %r,' % (' ' * ll, adder_space, f))
193                self.add('%s %s   %r]' % (' ' * ll, adder_space, files[-1]))
194
195        def _data_insert(data, cpu, frag):
196            #
197            # The default handler returns an empty string. Skip it.
198            #
199            if type(frag) is not str:
200                # Start at the top of the tree
201                d = data
202                path = frag[0]
203                if path[0] not in d:
204                    d[path[0]] = {}
205                # Select the sub-part of the tree as the compile options
206                # specialise how files are built.
207                d = d[path[0]]
208                if type(path[1]) is list:
209                    p = ' '.join(path[1])
210                else:
211                    p = path[1]
212                if p not in d:
213                    d[p] = {}
214                d = d[p]
215                if cpu not in d:
216                    d[cpu] = []
217                if type(frag[1]) is list:
218                    d[cpu] += frag[1]
219                else:
220                    d[cpu] = frag[1]
221                if len(frag) > 3:
222                    if 'cflags' not in d[cpu]:
223                        d['cflags'] = []
224                    d['cflags'] += frag[2]
225                if len(frag) >= 3 and None not in frag[-1]:
226                    if 'includes' not in d[cpu]:
227                        d['includes'] = []
228                    d['includes'] += frag[-1]
229
230        data = { }
231
232        for mn in self.getModules():
233            m = self[mn]
234            if m.conditionalOn == "none":
235                for f in m.files:
236                    _data_insert(data, 'all', f.getFragment())
237            for cpu, files in sorted(m.cpuDependentSourceFiles.items()):
238                for f in files:
239                    _data_insert(data, cpu, f.getFragment())
240
241        if trace:
242            import pprint
243            pprint.pprint(data)
244
245        self.restart()
246
247        self.add('#')
248        self.add('# RTEMS Project (https://www.rtems.org)')
249        self.add('#')
250        self.add('# Generated waf script. Do not edit, run ./freebsd-to-rtems.py -m')
251        self.add('#')
252        self.add('# To use see README.waf shipped with this file.')
253        self.add('#')
254        self.add('')
255        self.add('from __future__ import print_function')
256        self.add('')
257        self.add('import os.path')
258        self.add('import rtems_waf.rtems as rtems')
259        self.add('')
260        self.add('def init(ctx):')
261        self.add('    pass')
262        self.add('')
263        self.add('def options(opt):')
264        self.add('    pass')
265        self.add('')
266        self.add('def bsp_configure(conf, arch_bsp):')
267        self.add('    pass')
268        self.add('')
269        self.add('def configure(conf):')
270        self.add('    pass')
271        self.add('')
272        self.add('def build(bld):')
273        self.add('    # C/C++ flags')
274        self.add('    common_flags = []')
275        for f in builder.common_flags():
276            self.add('    common_flags += ["%s"]' % (f))
277        self.add('    if bld.env.WARNINGS:')
278        for f in builder.common_warnings():
279            self.add('        common_flags += ["%s"]' % (f))
280        self.add('    else:')
281        for f in builder.common_no_warnings():
282            self.add('        common_flags += ["%s"]' % (f))
283        self.add('    cflags = %r + common_flags' % (builder.cflags()))
284        self.add('    cxxflags = %r + common_flags' % (builder.cxxflags()))
285        self.add('')
286        self.add('    # Defines')
287        self.add('    defines = []')
288        self.add('    if len(bld.env.FREEBSD_OPTIONS) > 0:')
289        self.add('        for o in bld.env.FREEBSD_OPTIONS.split(","):')
290        self.add('            defines += ["%s=1" % (o.strip().upper())]')
291        self.add('')
292        self.add('    # Include paths')
293        self.add('    includes = []')
294        self.add('    for i in %r:' % (builder.cpu_includes()))
295        self.add('        includes += ["%s" % (i[2:].replace("@CPU@", bld.get_env()["RTEMS_ARCH"]))]')
296        self.add('    if bld.get_env()["RTEMS_ARCH"] == "i386":')
297        self.add('        for i in %r:' % (builder.cpu_includes()))
298        self.add('            includes += ["%s" % (i[2:].replace("@CPU@", "x86"))]')
299        for i in builder.includes():
300            self.add('    includes += ["%s"]' % (i[2:]))
301        self.add('')
302        self.add('    # Support dummy PIC IRQ includes')
303        self.add('    if bld.get_env()["RTEMS_ARCH"] not in ("arm", "i386", "lm32", "mips", "powerpc", "sparc", "m68k"):')
304        self.add('        includes += ["rtems-dummy-pic-irq/include"]')
305        self.add('')
306
307        self.add('    # Collect the libbsd uses')
308        self.add('    libbsd_use = []')
309        self.add('')
310
311        #
312        # Support the existing Makefile based network configuration file.
313        #
314        self.add('    # Network test configuration')
315        self.add('    if not os.path.exists(bld.env.NET_CONFIG):')
316        self.add('        bld.fatal("network configuraiton \'%s\' not found" % (bld.env.NET_CONFIG))')
317        self.add('    net_cfg_self_ip = None')
318        self.add('    net_cfg_netmask = None')
319        self.add('    net_cfg_peer_ip = None')
320        self.add('    net_cfg_gateway_ip = None')
321        self.add('    net_tap_interface = None')
322        self.add('    try:')
323        self.add('        net_cfg_lines = open(bld.env.NET_CONFIG).readlines()')
324        self.add('    except:')
325        self.add('        bld.fatal("network configuraiton \'%s\' read failed" % (bld.env.NET_CONFIG))')
326        self.add('    lc = 0')
327        self.add('    for l in net_cfg_lines:')
328        self.add('        lc += 1')
329        self.add('        if l.strip().startswith("NET_CFG_"):')
330        self.add('            ls = l.split("=")')
331        self.add('            if len(ls) != 2:')
332        self.add('                bld.fatal("network configuraiton \'%s\' parse error: %d: %s" % ' + \
333                 '(bld.env.NET_CONFIG, lc, l))')
334        self.add('            lhs = ls[0].strip()')
335        self.add('            rhs = ls[1].strip()')
336        self.add('            if lhs == "NET_CFG_SELF_IP":')
337        self.add('                net_cfg_self_ip = rhs')
338        self.add('            if lhs == "NET_CFG_NETMASK":')
339        self.add('                net_cfg_netmask = rhs')
340        self.add('            if lhs == "NET_CFG_PEER_IP":')
341        self.add('                net_cfg_peer_ip = rhs')
342        self.add('            if lhs == "NET_CFG_GATEWAY_IP":')
343        self.add('                net_cfg_gateway_ip = rhs')
344        self.add('            if lhs == "NET_TAP_INTERFACE":')
345        self.add('                net_tap_interface = rhs')
346        self.add('    bld(target = "testsuite/include/rtems/bsd/test/network-config.h",')
347        self.add('        source = "testsuite/include/rtems/bsd/test/network-config.h.in",')
348        self.add('        rule = "sed -e \'s/@NET_CFG_SELF_IP@/%s/\' ' + \
349                 '-e \'s/@NET_CFG_NETMASK@/%s/\' ' + \
350                 '-e \'s/@NET_CFG_PEER_IP@/%s/\' ' + \
351                 '-e \'s/@NET_CFG_GATEWAY_IP@/%s/\' < ${SRC} > ${TGT}" % ' + \
352                 '(net_cfg_self_ip, net_cfg_netmask, net_cfg_peer_ip, net_cfg_gateway_ip),')
353        self.add('        update_outputs = True)')
354        self.add('')
355
356        #
357        # Add the specific rule based builders for generating files.
358        #
359        if 'KVMSymbols' in data:
360            kvmsymbols = data['KVMSymbols']
361            if 'includes' in kvmsymbols['files']:
362                includes = kvmsymbols['files']['includes']
363            else:
364                includes = []
365            self.add('    # KVM Symbols')
366            self.add('    bld(target = "%s",' % (kvmsymbols['files']['all'][0]))
367            self.add('        source = "rtemsbsd/rtems/generate_kvm_symbols",')
368            self.add('        rule = "./${SRC} > ${TGT}",')
369            self.add('        update_outputs = True)')
370            self.add('    bld.objects(target = "kvmsymbols",')
371            self.add('                features = "c",')
372            self.add('                cflags = cflags,')
373            self.add('                includes = %r + includes,' % (includes))
374            self.add('                source = "%s")' % (kvmsymbols['files']['all'][0]))
375            self.add('    libbsd_use += ["kvmsymbols"]')
376            self.add('')
377
378        self.add('    bld.add_group()')
379
380        if 'RPCGen' in data:
381            rpcgen = data['RPCGen']
382            rpcname = rpcgen['files']['all'][0][:-2]
383            self.add('    # RPC Generation')
384            self.add('    if bld.env.AUTO_REGEN:')
385            self.add('        bld(target = "%s.h",' % (rpcname))
386            self.add('            source = "%s.x",' % (rpcname))
387            self.add('            rule = "${RPCGEN} -h -o ${TGT} ${SRC}")')
388            self.add('')
389
390        if 'RouteKeywords' in data:
391            routekw = data['RouteKeywords']
392            rkwname = routekw['files']['all'][0]
393            self.add('    # Route keywords')
394            self.add('    if bld.env.AUTO_REGEN:')
395            self.add('        rkw_rule = "cat ${SRC} | ' + \
396                     'awk \'BEGIN { r = 0 } { if (NF == 1) ' + \
397                     'printf \\"#define\\\\tK_%%s\\\\t%%d\\\\n\\\\t{\\\\\\"%%s\\\\\\", K_%%s},\\\\n\\", ' + \
398                     'toupper($1), ++r, $1, toupper($1)}\' > ${TGT}"')
399            self.add('        bld(target = "%s.h",' % (rkwname))
400            self.add('            source = "%s",' % (rkwname))
401            self.add('            rule = rkw_rule)')
402            self.add('')
403
404        if 'lex' in data:
405            lexes = data['lex']
406            self.add('    # Lex')
407            for l in sorted(lexes.keys()):
408                lex = lexes[l]['all']
409                if 'cflags' in lex:
410                    lex_defines = [d[2:] for d in lex['cflags']]
411                else:
412                    lex_defines = []
413                if 'includes' in lex:
414                    lex_includes = lex['includes']
415                else:
416                    lex_includes = []
417                self.add('    if bld.env.AUTO_REGEN:')
418                self.add('        bld(target = "%s.c",' % (lex['file'][:-2]))
419                self.add('            source = "%s",' % (lex['file']))
420                self.add('            rule = "${LEX} -P %s -t ${SRC} | ' % (lex['sym']) + \
421                         'sed -e \'/YY_BUF_SIZE/s/16384/1024/\' > ${TGT}")')
422                self.add('    bld.objects(target = "lex_%s",' % (lex['sym']))
423                self.add('                features = "c",')
424                self.add('                cflags = cflags,')
425                self.add('                includes = %r + includes,' % (lex_includes))
426                self.add('                defines = defines + %r,' % (lex_defines))
427                self.add('                source = "%s.c")' % (lex['file'][:-2]))
428                self.add('    libbsd_use += ["lex_%s"]' % (lex['sym']))
429                self.add('')
430
431        if 'yacc' in data:
432            yaccs = data['yacc']
433            self.add('    # Yacc')
434            for y in sorted(yaccs.keys()):
435                yacc = yaccs[y]['all']
436                yacc_file = yacc['file']
437                if yacc['sym'] is not None:
438                    yacc_sym = yacc['sym']
439                else:
440                    yacc_sym = os.path.basename(yacc_file)[:-2]
441                yacc_header = '%s/%s' % (os.path.dirname(yacc_file), yacc['header'])
442                if 'cflags' in yacc:
443                    yacc_defines = [d[2:] for d in yacc['cflags']]
444                else:
445                    yacc_defines = []
446                if 'includes' in yacc:
447                    yacc_includes = yacc['includes']
448                else:
449                    yacc_includes = []
450                self.add('    if bld.env.AUTO_REGEN:')
451                self.add('        bld(target = "%s.c",' % (yacc_file[:-2]))
452                self.add('            source = "%s",' % (yacc_file))
453                self.add('            rule = "${YACC} -b %s -d -p %s ${SRC} && ' % (yacc_sym, yacc_sym) + \
454                         'sed -e \'/YY_BUF_SIZE/s/16384/1024/\' < %s.tab.c > ${TGT} && ' % (yacc_sym) + \
455                         'rm -f %s.tab.c && mv %s.tab.h %s")' % (yacc_sym, yacc_sym, yacc_header))
456                self.add('    bld.objects(target = "yacc_%s",' % (yacc_sym))
457                self.add('                features = "c",')
458                self.add('                cflags = cflags,')
459                self.add('                includes = %r + includes,' % (yacc_includes))
460                self.add('                defines = defines + %r,' % (yacc_defines))
461                self.add('                source = "%s.c")' % (yacc_file[:-2]))
462                self.add('    libbsd_use += ["yacc_%s"]' % (yacc_sym))
463            self.add('')
464
465        #
466        # We have 'm' different sets of flags and there can be 'n' cpus
467        # specific files for those flags.
468        #
469        objs = 0
470        self.add('    # Objects built with different CFLAGS')
471        for flags in sorted(data['sources']):
472            if flags is not 'default':
473                objs += 1
474                _source_list('    objs%02d_source' % objs, sorted(data['sources'][flags]['all']))
475                archs = sorted(data['sources'][flags])
476                for arch in archs:
477                    if arch not in ['all', 'cflags', 'includes']:
478                        self.add('    if bld.get_env()["RTEMS_ARCH"] == "%s":' % arch)
479                        _source_list('        objs%02d_source' % objs,
480                                     sorted(data['sources'][flags][arch]),
481                                     append = True)
482                if 'cflags' in data['sources'][flags]:
483                    defines = [d[2:] for d in data['sources'][flags]['cflags']]
484                else:
485                    defines = []
486                if 'includes' in data['sources'][flags]:
487                    includes = data['sources'][flags]['includes']
488                else:
489                    includes = []
490                self.add('    bld.objects(target = "objs%02d",' % (objs))
491                self.add('                features = "c",')
492                self.add('                cflags = cflags,')
493                self.add('                includes = %r + includes,' % (includes))
494                self.add('                defines = defines + %r,' % (defines))
495                self.add('                source = objs%02d_source)' % objs)
496                self.add('    libbsd_use += ["objs%02d"]' % (objs))
497                self.add('')
498
499        #
500        # We hold the 'default' cflags set of files to the end to create the
501        # static library with.
502        #
503        _source_list('    source', sorted(data['sources']['default']['all']))
504        archs = sorted(data['sources']['default'])
505        for arch in archs:
506            if arch is not 'all':
507                self.add('    if bld.get_env()["RTEMS_ARCH"] == "%s":' % arch)
508                _source_list('        source',
509                             sorted(data['sources']['default'][arch]),
510                             append = True)
511        self.add('    bld.stlib(target = "bsd",')
512        self.add('              features = "c cxx",')
513        self.add('              cflags = cflags,')
514        self.add('              cxxflags = cxxflags,')
515        self.add('              includes = includes,')
516        self.add('              defines = defines,')
517        self.add('              source = source,')
518        self.add('              use = libbsd_use)')
519        self.add('')
520
521        #
522        # Head file collector.
523        #
524        self.add('    # Installs.    ')
525        self.add('    bld.install_files("${PREFIX}/" + rtems.arch_bsp_lib_path(bld.env.RTEMS_VERSION, bld.env.RTEMS_ARCH_BSP), ["libbsd.a"])')
526        header_paths = builder.header_paths()
527        self.add('    header_paths = [%s,' % (str(header_paths[0])))
528        for hp in header_paths[1:-1]:
529            self.add('                     %s,' % (str(hp)))
530        self.add('                     %s]' % (str(header_paths[-1])))
531        self.add('    for headers in header_paths:')
532        self.add('        ipath = os.path.join(rtems.arch_bsp_include_path(bld.env.RTEMS_VERSION, bld.env.RTEMS_ARCH_BSP), headers[2])')
533        self.add('        start_dir = bld.path.find_dir(headers[0])')
534        self.add('        bld.install_files("${PREFIX}/" + ipath,')
535        self.add('                          start_dir.ant_glob("**/" + headers[1]),')
536        self.add('                          cwd = start_dir,')
537        self.add('                          relative_trick = True)')
538        self.add('')
539
540        self.add('    # Tests')
541        tests = data['tests']
542        for test_name in sorted(tests):
543            files = ['testsuite/%s/%s.c' % (test_name, f) for f in  data['tests'][test_name]['all']['files']]
544            _source_list('    test_%s' % (test_name), sorted(files))
545            self.add('    bld.program(target = "%s.exe",' % (test_name))
546            self.add('                features = "cprogram",')
547            self.add('                cflags = cflags,')
548            self.add('                includes = includes,')
549            self.add('                source = test_%s,' % (test_name))
550            self.add('                use = ["bsd"],')
551            self.add('                lib = ["m", "z"],')
552            self.add('                install_path = None)')
553            self.add('')
554
555        self.write()
Note: See TracBrowser for help on using the repository browser.