本文整理匯總了Python中escutil.GetCursorPosition.y方法的典型用法代碼示例。如果您正苦於以下問題:Python GetCursorPosition.y方法的具體用法?Python GetCursorPosition.y怎麽用?Python GetCursorPosition.y使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類escutil.GetCursorPosition
的用法示例。
在下文中一共展示了GetCursorPosition.y方法的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Python代碼示例。
示例1: test_VPA_DefaultParams
# 需要導入模塊: from escutil import GetCursorPosition [as 別名]
# 或者: from escutil.GetCursorPosition import y [as 別名]
def test_VPA_DefaultParams(self):
"""With no params, VPA moves to 1st line."""
esccmd.VPA(6)
position = GetCursorPosition()
AssertEQ(position.y(), 6)
esccmd.VPA()
position = GetCursorPosition()
AssertEQ(position.y(), 1)
示例2: test_HVP_ColumnOnly
# 需要導入模塊: from escutil import GetCursorPosition [as 別名]
# 或者: from escutil.GetCursorPosition import y [as 別名]
def test_HVP_ColumnOnly(self):
"""Default row is 1."""
esccmd.HVP(Point(6, 3))
position = GetCursorPosition()
AssertEQ(position.x(), 6)
AssertEQ(position.y(), 3)
esccmd.HVP(col=2)
position = GetCursorPosition()
AssertEQ(position.x(), 2)
AssertEQ(position.y(), 1)
示例3: test_CUP_RowOnly
# 需要導入模塊: from escutil import GetCursorPosition [as 別名]
# 或者: from escutil.GetCursorPosition import y [as 別名]
def test_CUP_RowOnly(self):
"""Default column is 1."""
esccmd.CUP(Point(6, 3))
position = GetCursorPosition()
AssertEQ(position.x(), 6)
AssertEQ(position.y(), 3)
esccmd.CUP(row=2)
position = GetCursorPosition()
AssertEQ(position.x(), 1)
AssertEQ(position.y(), 2)
示例4: test_HVP_DefaultParams
# 需要導入模塊: from escutil import GetCursorPosition [as 別名]
# 或者: from escutil.GetCursorPosition import y [as 別名]
def test_HVP_DefaultParams(self):
"""With no params, HVP moves to 1,1."""
esccmd.HVP(Point(6, 3))
position = GetCursorPosition()
AssertEQ(position.x(), 6)
AssertEQ(position.y(), 3)
esccmd.HVP()
position = GetCursorPosition()
AssertEQ(position.x(), 1)
AssertEQ(position.y(), 1)
示例5: test_HVP_ZeroIsTreatedAsOne
# 需要導入模塊: from escutil import GetCursorPosition [as 別名]
# 或者: from escutil.GetCursorPosition import y [as 別名]
def test_HVP_ZeroIsTreatedAsOne(self):
"""Zero args are treated as 1."""
esccmd.HVP(Point(6, 3))
esccmd.HVP(col=0, row=0)
position = GetCursorPosition()
AssertEQ(position.x(), 1)
AssertEQ(position.y(), 1)
示例6: test_VPR_DefaultParams
# 需要導入模塊: from escutil import GetCursorPosition [as 別名]
# 或者: from escutil.GetCursorPosition import y [as 別名]
def test_VPR_DefaultParams(self):
"""With no params, VPR moves right by 1."""
esccmd.CUP(Point(1, 6))
esccmd.VPR()
position = GetCursorPosition()
AssertEQ(position.y(), 7)
示例7: test_CHA_DefaultParam
# 需要導入模塊: from escutil import GetCursorPosition [as 別名]
# 或者: from escutil.GetCursorPosition import y [as 別名]
def test_CHA_DefaultParam(self):
"""CHA moves to first column of active line by default."""
esccmd.CUP(Point(5, 3))
esccmd.CHA()
position = GetCursorPosition()
AssertEQ(position.x(), 1)
AssertEQ(position.y(), 3)
示例8: test_CHA_ZeroParam
# 需要導入模塊: from escutil import GetCursorPosition [as 別名]
# 或者: from escutil.GetCursorPosition import y [as 別名]
def test_CHA_ZeroParam(self):
"""CHA moves as far left as possible when given a zero parameter."""
esccmd.CUP(Point(5, 3))
esccmd.CHA(0)
position = GetCursorPosition()
AssertEQ(position.x(), 1)
AssertEQ(position.y(), 3)
示例9: test_CPL_ExplicitParam
# 需要導入模塊: from escutil import GetCursorPosition [as 別名]
# 或者: from escutil.GetCursorPosition import y [as 別名]
def test_CPL_ExplicitParam(self):
"""CPL moves the cursor up by the passed-in number of lines."""
esccmd.CUP(Point(6, 5))
esccmd.CPL(2)
position = GetCursorPosition()
AssertEQ(position.x(), 1)
AssertEQ(position.y(), 3)
示例10: test_IND_Basic
# 需要導入模塊: from escutil import GetCursorPosition [as 別名]
# 或者: from escutil.GetCursorPosition import y [as 別名]
def test_IND_Basic(self):
"""Index moves the cursor down one line."""
esccmd.CUP(Point(5, 3))
esccmd.IND()
position = GetCursorPosition()
AssertEQ(position.x(), 5)
AssertEQ(position.y(), 4)
示例11: test_NEL_Basic
# 需要導入模塊: from escutil import GetCursorPosition [as 別名]
# 或者: from escutil.GetCursorPosition import y [as 別名]
def test_NEL_Basic(self):
"""Next Line moves the cursor down one line and to the start of the next line."""
esccmd.CUP(Point(5, 3))
esccmd.NEL()
position = GetCursorPosition()
AssertEQ(position.x(), 1)
AssertEQ(position.y(), 4)
示例12: test_CHA_ExplicitParam
# 需要導入模塊: from escutil import GetCursorPosition [as 別名]
# 或者: from escutil.GetCursorPosition import y [as 別名]
def test_CHA_ExplicitParam(self):
"""CHA moves to specified column of active line."""
esccmd.CUP(Point(5, 3))
esccmd.CHA(10)
position = GetCursorPosition()
AssertEQ(position.x(), 10)
AssertEQ(position.y(), 3)
示例13: test_RI_Basic
# 需要導入模塊: from escutil import GetCursorPosition [as 別名]
# 或者: from escutil.GetCursorPosition import y [as 別名]
def test_RI_Basic(self):
"""Reverse index moves the cursor up one line."""
esccmd.CUP(Point(5, 3))
esccmd.RI()
position = GetCursorPosition()
AssertEQ(position.x(), 5)
AssertEQ(position.y(), 2)
示例14: test_CUB_DefaultParam
# 需要導入模塊: from escutil import GetCursorPosition [as 別名]
# 或者: from escutil.GetCursorPosition import y [as 別名]
def test_CUB_DefaultParam(self):
"""CUB moves the cursor left 1 with no parameter given."""
esccmd.CUP(Point(5, 3))
esccmd.CUB()
position = GetCursorPosition()
AssertEQ(position.x(), 4)
AssertEQ(position.y(), 3)
示例15: test_CPL_DefaultParam
# 需要導入模塊: from escutil import GetCursorPosition [as 別名]
# 或者: from escutil.GetCursorPosition import y [as 別名]
def test_CPL_DefaultParam(self):
"""CPL moves the cursor up 1 with no parameter given."""
esccmd.CUP(Point(5, 3))
esccmd.CPL()
position = GetCursorPosition()
AssertEQ(position.x(), 1)
AssertEQ(position.y(), 2)