转到XY [英] Goto XY
问题描述
在python中是否有一些命令,以便我可以读取一个键的输入和
然后使用gotoxy()函数在屏幕上移动光标?例如:
(伪代码)
当按下右箭头时,光标gotoxy(x + 1,y)
>
谢谢。
Is there some command in python so that I can read a key''s input and
then use a gotoxy() function to move the cursor on screen? e.g.:
(psuedo-code)
When the right arrow is pushed, cursor gotoxy(x+1,y)
Thanks.
推荐答案
al *********** @ gmail.com 写道:
在python中是否有一些命令让我可以读取一个键的输入和
然后使用gotoxy()函数在屏幕上移动光标?例如:
(伪代码)
当按下右箭头时,光标gotoxy(x + 1,y)
谢谢。
Is there some command in python so that I can read a key''s input and
then use a gotoxy() function to move the cursor on screen? e.g.:
(psuedo-code)
When the right arrow is pushed, cursor gotoxy(x+1,y)
Thanks.
在类Unix平台上,此功能由标准的
curses模块提供。用于Windows的类似模块似乎可以在
http: //www.effbot.org/zone/console-index.htm 但我没有测试它
out。
- - 大卫
On Unix-like platforms, this functionality is provided by the standard
curses module. A similar module for Windows appears to be available at
http://www.effbot.org/zone/console-index.htm but I haven''t tested it
out.
-- David
al *** ********@gmail.com 写道:
al***********@gmail.com writes:
在python中是否有一些命令,以便我可以读取一个键的输入和
(伪代码)
当按下右箭头时,光标gotoxy(x + 1,y)
Is there some command in python so that I can read a key''s input and
then use a gotoxy() function to move the cursor on screen? e.g.:
(psuedo-code)
When the right arrow is pushed, cursor gotoxy(x+1,y)
你想要诅咒。如果在Unix上使用
,则标准库中包含一个版本。如果你在Windows上,有第三方诅咒
库。您应该能够安装它,然后针对它构建
curses模块。如果你不是这两个中的任何一个 - 告诉我们你正在使用什么,也许有人知道那个系统将会给你答案。
回答你。 />
< mike
-
Mike Meyer< mw*@mired.org> http://www.mired.org/home/mwm/
独立的WWW / Perforce / FreeBSD / Unix顾问,电子邮件以获取更多信息。
You want curses. A version is included in the standard library if
you''re on Unix. If you''re on Windows, there are third party curses
libraries. You should be able to install that and then build the
curses module against it. If you''re not on either of those two - tell
us what you''re using, and maybe someone who knows that system will
answer you.
<mike
--
Mike Meyer <mw*@mired.org> http://www.mired.org/home/mwm/
Independent WWW/Perforce/FreeBSD/Unix consultant, email for more information.
WConio为Windows执行此操作。见......
getkey()和gotoxy()
http://newcenturycomputers.net/projects/wconio.html
WConio does this for Windows. See...
getkey() and gotoxy()
http://newcenturycomputers.net/projects/wconio.html
这篇关于转到XY的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!