def SetScaleAndBounds(self, dc):
        """
        Calculate the scale required for our printout to match what appears on screen,
        and the bounds that will be effective at that scale and margins
        """
        # This code comes from Robin Dunn's "wxPython In Action."
        # Without that, I would never have figured this out.
        ppiPrinterX, ppiPrinterY = self.GetPPIPrinter()
        ppiScreenX, ppiScreenY = self.GetPPIScreen()
        logicalScale = float(ppiPrinterX) / float(ppiScreenX)
        pw, ph = self.GetPageSizePixels()
        dw, dh = dc.GetSize()
        scale = logicalScale * float(pw)/float(dw)
        dc.SetUserScale(scale, scale)

        # Now calculate our boundries
        logicalUnitsMM = float(ppiPrinterX) / (logicalScale*25.4)
        topLeft, bottomRight = self.margins
        left = round(topLeft.x * logicalUnitsMM)
        top = round(topLeft.y * logicalUnitsMM)
        right = round(dc.DeviceToLogicalYRel(dw) - bottomRight.x * logicalUnitsMM)
        bottom = round(dc.DeviceToLogicalYRel(dh) - bottomRight.y * logicalUnitsMM)
        self.bounds = (left, top, right-left, bottom-top)


#----------------------------------------------------------------------------
dataset/ETHPy150Open ODM2/ODMToolsPython/odmtools/lib/ObjectListView/ListCtrlPrinter.py/ListCtrlPrintout.SetScaleAndBounds/swapped operands of `/`