def check_mime_content_type(content_type):
 ctrls = u''.join((chr(x) for x in range(0, 32)))
 token_regex = u'[^()<>@,;:\\"/[\\]?= {}\x7f]+'.format(ctrls)
 return (re.match(u'(?P<type>{})/(?P<subtype>{})$'.format(token_regex, token_regex), content_type) is not None)

def check_mime_content_type ( content_type ) : ctrls = u'' . join ( ( chr ( x ) for x in range ( 0 , 32 ) ) ) token_regex = u'[^()<>@,;:\\"/[\\]?= {}\x7f]+' . format ( ctrls ) return ( re . match ( u'(?P<type>{})/(?P<subtype>{})$' . format ( token_regex , token_regex ) , content_type ) is not None )
raises a ~astropy .