def dict_to_tabs( d, order=None ):
    """
    Return tab-separated values for all values in d and ordered
    by the keys in order (if given).
    """
    order = order or d.keys()
    return '\t'.join([ str( d[ key ] ) for key in order ])