def parse_header( line ):
	"""Parses a header line into a (key, value) tuple, trimming
	whitespace off ends.  Introductory 'From ' header not treated."""
	colon = line.find( ':' )
	space = line.find( ' ' )

	# If starts with something with no whitespace then a colon,
	# that's the ID.
	if colon > -1 and ( space == -1 or space > colon ):
		id = line[ 0: colon + 1 ]
		value = line[ colon + 1:]
		if value:
			value = value.strip()
		return ( id, value )

	return ( None, None )