def scrub_comments(src_text):
 pattern_text = ((multi_line_comment + u'|') + single_line_comment)
 pattern = re.compile(pattern_text, (re.M | re.S))
 scrubed_src_text = pattern.sub(u'', src_text)
 return scrubed_src_text

def scrub_comments ( src_text ) : pattern_text = ( ( multi_line_comment + u'|' ) + single_line_comment ) pattern = re . compile ( pattern_text , ( re . M | re . S ) ) scrubed_src_text = pattern . sub ( u'' , src_text ) return scrubed_src_text
replace all commented portions of a given source text as spaces .