def Slope(pt1, pt2):
    """
    Calculates the slope of the line connecting 2 points.

    :param `pt1`: an instance of :class:`wx.Point`;
    :param `pt2`: another instance of :class:`wx.Point`.
    """
    y = float(pt2.y - pt1.y)
    x = float(pt2.x - pt1.x)
    if x:
        return y / x
    else:
        return None
