예제 #1
0
파일: wavefront.py 프로젝트: meyerann/WPG
    def _update_from_dict(self, in_dict):
        """
        Update wavefront from dictionary. Used for loading wavefront to HDF5 file.

        :param in_dict: input dictionary
        :type in_dict: dict
        """
        for (key, value) in in_dict.iteritems():
            if key in self._wf_fields:
                self._wf_fields[key].value = value
            else:
                utils.update_dict_slash_string(self.custom_fields, key, value)
예제 #2
0
파일: wavefront.py 프로젝트: samoylv/WPG
    def _update_from_dict(self, in_dict):
        """
        Update wavefront from dictionary. Used for loading wavefront to HDF5 file.

        :param in_dict: input dictionary
        :type in_dict: dict
        """
        for (key, value) in in_dict.items():
            # python3 hack
            if isinstance(key, bytes):
                key = key.decode('utf-8')

            if key in self._wf_fields:
                self._wf_fields[key].value = value
            else:
                utils.update_dict_slash_string(self.custom_fields, key, value)
예제 #3
0
파일: wavefront.py 프로젝트: samoylv/WPG
    def _update_from_dict(self, in_dict):
        """
        Update wavefront from dictionary. Used for loading wavefront to HDF5 file.

        :param in_dict: input dictionary
        :type in_dict: dict
        """
        for (key, value) in in_dict.items():
            # python3 hack
            if isinstance(key, bytes):
                key = key.decode('utf-8')

            if key in self._wf_fields:
                self._wf_fields[key].value = value
            else:
                utils.update_dict_slash_string(self.custom_fields, key, value)