Changeset 13890


Ignore:
Timestamp:
Oct 29, 2019 9:30:52 AM (2 weeks ago)
Author:
randersson
Message:

#5819 Fixed issue with ResultDymolaBinary to have instance attributes consist of bytes instead of strings. This caused print("my_result_dymola_binary.name") to display [b'foo', b'bar', ...]. Also added CHANGELOG entries for commits r13811-r13866

Location:
PyFMI/trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • PyFMI/trunk/CHANGELOG

    r13728 r13890  
    11--- CHANGELOG ---
     2
     3--- PyFMI-2.5.6 ---
     4    * Fixed such that instance attributes 'name' and 'raw_name' in class ResultDymolaBinary
     5      are now attributes that consists of strings instead of bytes in Python 3.
     6    * Fixed issue with set_string when input was a list of strings in Python 3.
     7    * Fixed other bytes/string incompabilities that caused exceptions with
     8      Python 3.
    29
    310--- PyFMI-2.5.5 ---
  • PyFMI/trunk/src/common/io.py

    r13866 r13890  
    11201120
    11211121        self.name = fmi_util.convert_array_names_list_names_int(name.view(np.int32))
     1122        self.name = [item.decode("utf8") if python3_flag else item for item in self.name]
    11221123        self.dataInfo = self.raw['dataInfo'].transpose()
    1123         self.name_lookup = {key:ind for ind,key in enumerate(self.name)}
     1124        self.name_lookup = {key.decode("utf8") if python3_flag else key:ind for ind,key in enumerate(self.name)}
    11241125       
    11251126        self._description = None
Note: See TracChangeset for help on using the changeset viewer.