def __timestamp(self, pyc_filename):
        "__get_timestamp(pyc_filename) Gets timestamp stored in .pyc file."

        assert isinstance(pyc_filename, str) and pyc_filename
        assert pyc_filename.endswith('.pyc')
        assert os.path.isfile(pyc_filename)
        assert os.access(pyc_filename, os.R_OK)

        try:
            pyc = open(pyc_filename, 'rb')
            # The first 4 bytes is a magic number.for pyc file.
            # this checks the python's version.
            if pyc.read(4) == imp.get_magic():
                # The next 4 bytes is the timestamp stored as long,
                # we need this value.
                return struct.unpack("<l", pyc.read(4))[0]
            else:
                # Not .pyc file or wrong version of python.
                # It should be always updated.
                return -1
        finally:
            pyc.close()
__get_timestamp(pyc_filename) Gets timestamp stored in .pyc file.
recipes/Python/435694_Evaluate_upperletters_variable_name_constants/recipe-435694.py