import re


def get_message_list(path):
	"""get list of messages from a code file"""
	messages = []
	with open(path, 'r') as sourcefile:
		txt = sourcefile.read()
		messages += re.findall('_\("([^"]*)".*\)', txt)
		messages += re.findall("_\('([^']*)'.*\)", txt)
		messages += re.findall('_\("{3}([^"]*)"{3}.*\)', txt, re.S)	
		
	return messages