import re
print( re.sub(r'("[^"]*")|,', 
	lambda x: x.group(1) if x.group(1) else x.group().replace(",", ""),
	'1,2,"test,3,7","4, 5,6, ... "') )
	# => 12"test,3,7""4, 5,6, ... "
	
print( re.sub(r'(?s)("[^"\\]*(?:\\.[^"\\]*)*")|,', 
	lambda x: x.group(1) if x.group(1) else x.group().replace(",", ""),
	r'1,2,"test, \"a,b,c\" ,03","4, 5,6, ... "') )
	# => 12"test, \"a,b,c\" ,03""4, 5,6, ... "