def determine_wildcard(extension=None, file_type=None):
    """
	Assemble a wildcard string of the form:
		[[file_type ](*.extension)|*.extension|]<all_files>
	"""
    all_files = 'All files|*'
    if extension is not None:
        if '|' in extension:
            raise ValueError(extension)
        if file_type is not None:
            if '|' in file_type:
                raise ValueError(file_type)
            wildcard = '{0} (*.{1})|*.{1}|{2}'.format(file_type, extension,
                all_files)
        else:
            wildcard = '(*.{0})|*.{0}|{1}'.format(extension, all_files)
    else:
        wildcard = all_files
    return wildcard
