4 def _write_message(kind
, message
):
5 program
= os
.path
.basename(sys
.argv
[0])
6 sys
.stderr
.write('%s: %s: %s\n' % (program
, kind
, message
))
8 note
= lambda message
: _write_message('note', message
)
9 warning
= lambda message
: _write_message('warning', message
)
10 error
= lambda message
: _write_message('error', message
)
11 fatal
= lambda message
: (_write_message('fatal error', message
), sys
.exit(1))
13 __all__
= ['note', 'warning', 'error', 'fatal']