python gotoxy

python gotoxy,第1张

概述importctypesimportosSTD_INPUT_HANDLE=-10STD_OUTPUT_HANDLE=-11STD_ERROR_HANDLE=-12os.system('cls')classCOORD(ctypes.Structure):_fields_=[("X",ctypes.c_short),("Y",ctypes.c_short)]def__init__(s
import ctypesimport osSTD_input_HANDLE = -10STD_OUTPUT_HANDLE = -11STD_ERROR_HANDLE = -12os.system('cls')class COORD(ctypes.Structure):    _fIElds_ = [("X", ctypes.c_short), ("Y", ctypes.c_short)]    def __init__(self, x, y):        self.X = x        self.Y = ydef gotoxy(x,y):    hOut = ctypes.windll.kernel32.GetStdHandle(STD_OUTPUT_HANDLE)    ctypes.windll.kernel32.SetConsoleCursorposition(hOut,COORD(x,y))gotoxy(5, 5)print("test")

总结

以上是内存溢出为你收集整理的python gotoxy全部内容,希望文章能够帮你解决python gotoxy所遇到的程序开发问题。

如果觉得内存溢出网站内容还不错,欢迎将内存溢出网站推荐给程序员好友。

欢迎分享,转载请注明来源:内存溢出

原文地址: http://outofmemory.cn/langs/1187621.html

(0)
打赏 微信扫一扫 微信扫一扫 支付宝扫一扫 支付宝扫一扫
上一篇 2022-06-03
下一篇 2022-06-03

发表评论

登录后才能评论

评论列表(0条)

保存