def _set_magic_constants(self):
        """
        Adds magic constants to replace list.
        """
        real_path = os.path.realpath(self._source_filename)

        self._replace['__FILE__'] = "'%s'" % real_path
        self._replace['__ROUTINE__'] = "'%s'" % self._routine_name
        self._replace['__DIR__'] = "'%s'" % os.path.dirname(real_path)
def _set_magic_constants ( self ) : real_path = os . path . realpath ( self . _source_filename ) self . _replace [ '__FILE__' ] = "'%s'" % real_path self . _replace [ '__ROUTINE__' ] = "'%s'" % self . _routine_name self . _replace [ '__DIR__' ] = "'%s'" % os . path . dirname ( real_path )
Adds magic constants to replace list.