diff --git a/atrcopy/diskimages.py b/atrcopy/diskimages.py index 6ba9828..fdae08d 100644 --- a/atrcopy/diskimages.py +++ b/atrcopy/diskimages.py @@ -292,7 +292,7 @@ class DiskImageBase(object): def get_file(self, dirent): segment = self.get_file_segment(dirent) - return segment.tostring() + return segment.tobytes() def get_file_segment(self, dirent): pass diff --git a/atrcopy/dos33.py b/atrcopy/dos33.py index a7713d0..add0c94 100644 --- a/atrcopy/dos33.py +++ b/atrcopy/dos33.py @@ -245,7 +245,7 @@ class Dos33Dirent(Dirent): self.sector = values[1] self._file_type = values[2] & 0x7f self.locked = values[2] & 0x80 - self.filename = (bytes[3:0x20] - 0x80).tostring().rstrip() + self.filename = (bytes[3:0x20] - 0x80).tobytes().rstrip() self.num_sectors = int(values[4]) self.is_sane = self.sanity_check(image) @@ -699,12 +699,12 @@ class ProdosDiskImage(DiskImageBase): swap_order = False if (magic == [1, 56, 176, 3]).all(): data, style = self.get_sectors(1) - prodos = data[3:9].tostring() + prodos = data[3:9].tobytes() if prodos == "PRODOS": pass else: data, style = self.get_sectors(14) - prodos = data[3:9].tostring() + prodos = data[3:9].tobytes() if prodos == "PRODOS": swap_order = True else: diff --git a/atrcopy/segments.py b/atrcopy/segments.py index a3665a1..77f2587 100644 --- a/atrcopy/segments.py +++ b/atrcopy/segments.py @@ -71,7 +71,7 @@ class SegmentSaver(object): @classmethod def encode_data(cls, segment, ui_control): - return segment.tostring() + return segment.tobytes() class OrderWrapper(object): @@ -119,8 +119,8 @@ class OrderWrapper(object): def unindexed(self): return self.np_data[self.order] - def tostring(self): - return self.np_data[self.order].tostring() + def tobytes(self): + return self.np_data[self.order].tobytes() class UserExtraData(object): @@ -637,8 +637,8 @@ class DefaultSegment(object): raise IndexError("index %d not in this segment" % base_index) return int(index) - def tostring(self): - return self.data.tostring() + def tobytes(self): + return self.data.tobytes() def get_style_bits(self, **kwargs): return get_style_bits(**kwargs) @@ -1053,7 +1053,7 @@ class DefaultSegment(object): @property def search_copy(self): if self._search_copy is None: - self._search_copy = self.data.tostring() + self._search_copy = self.data.tobytes() return self._search_copy def compare_segment(self, other_segment):