swiftly/cli/context.py
def write_headers(self, fp, headers, mute=None):
        """
        Convenience function to output headers in a formatted fashion
        to a file-like fp, optionally muting any headers in the mute
        list.
        """
        if headers:
            if not mute:
                mute = []
            fmt = '%%-%ds %%s\n' % (max(len(k) for k in headers) + 1)
            for key in sorted(headers):
                if key in mute:
                    continue
                fp.write(fmt % (key.title() + ':', headers[key]))
            fp.flush()
def write_headers(self, fp, headers, mute=None):
        """
        Convenience function to output headers in a formatted fashion
        to a file-like fp, optionally muting any headers in the mute
        list.
        """
        if headers:
            if not mute:
                mute = []
            fmt = '%%-%ds %%s\n' % (max(len(k) for k in headers) + 1)
            for key in sorted(headers):
                if key in mute:
                    continue
                fp.write(fmt % (key.title() + ':', headers[key]))
            fp.flush()
def write_headers ( self , fp , headers , mute = None ) : if headers : if not mute : mute = [ ] fmt = '%%-%ds %%s\n' % ( max ( len ( k ) for k in headers ) + 1 ) for key in sorted ( headers ) : if key in mute : continue fp . write ( fmt % ( key . title ( ) + ':' , headers [ key ] ) ) fp . flush ( )
Convenience function to output headers in a formatted fashion
        to a file-like fp, optionally muting any headers in the mute
        list.
Convenience function to output headers in a formatted fashion to a file - like fp optionally muting any headers in the mute list .