def __init__(self, filename):
        """ construct function
            construction function that takes the name of the .py file.
            The function screens the entire file and gets ready to
            display the comments as help messages.
        """
        try:
            with open(filename) as pyfile:
                self._comment_head = re.compile(r"""^\s*\"{3}""")
                self._key_word = re.compile(r"""^\s*\"{3}\s*\S{1,}\s*\Z""")
                self._phase = Phase.HAVE_NOTHING
                self._is_comment = False
                self._general_help = ''
                self._specific_help = dict()
                self._tmp_key = ''
                self._tmp_msg = ''
                self._tmp_index = 0

                for line in pyfile:
                    if self._phase is Phase.HAVE_NOTHING:
                        self._general_help_filter(line)
                    elif self._phase is Phase.HAVE_GENERAL_MSG:
                        self._specific_help_filter(line)
        except IOError:
            print('Could not find the file: %s'%filename)
 construct function
            construction function that takes the name of the .py file.
            The function screens the entire file and gets ready to
            display the comments as help messages.
        
recipes/Python/577860_HelpMaker_builds_help_message_comments/recipe-577860.py