V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
推荐学习书目
Learn Python the Hard Way
Python Sites
PyPI - Python Package Index
http://diveintopython.org/toc/index.html
Pocoo
值得关注的项目
PyPy
Celery
Jinja2
Read the Docs
gevent
pyenv
virtualenv
Stackless Python
Beautiful Soup
结巴中文分词
Green Unicorn
Sentry
Shovel
Pyflakes
pytest
Python 编程
pep8 Checker
Styles
PEP 8
Google Python Style Guide
Code Style from The Hitchhiker's Guide
fyyz
V2EX  ›  Python

linux 下想写在终端有交互的 python 程序,但是不知道交互用什么

  •  
  •   fyyz · 2015-07-20 17:09:21 +08:00 · 2945 次点击
    这是一个创建于 3211 天前的主题,其中的信息可能已经有所发展或是发生改变。
    这种交互就像 vim 一样,可以通过上下左右方向键控制光标的坐标,可以控制特定的坐标所显示的字符。
    此外,还要能捕获键盘输入。比如说我输入 ESC 就退出什么的。

    不知道 Python 有什么库可以做到?
    7 条回复    2015-07-22 09:28:47 +08:00
    cxl008
        1
    cxl008  
       2015-07-20 17:13:53 +08:00
    curses?
    cheerzeng
        2
    cheerzeng  
       2015-07-20 17:15:37 +08:00
    你指的是做个console 吗?可以用cmd 这个库
    fyyz
        3
    fyyz  
    OP
       2015-07-20 17:31:33 +08:00 via Android
    @cheerzeng 我想做类似贪食蛇和俄罗斯方块这类东西,终端里跑的
    fxxkgw
        4
    fxxkgw  
       2015-07-21 10:09:35 +08:00
    普通的python代码 用py2exe 有参数可选是打包成GUI还是console终端这种模式
    mulog
        5
    mulog  
       2015-07-21 10:23:39 +08:00
    用过某个东西 UI是用 npyscreen 这个库做的 可以看看
    http://npyscreen.readthedocs.org/introduction.html
    xlvecle
        6
    xlvecle  
       2015-07-21 13:48:53 +08:00
    curses
    tput
    cheerzeng
        7
    cheerzeng  
       2015-07-22 09:28:47 +08:00
    @fyyz ok,那我理解错了,有一个叫kivy的http://kivy.org/#home
    关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   我们的愿景   ·   实用小工具   ·   2400 人在线   最高记录 6543   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 25ms · UTC 12:00 · PVG 20:00 · LAX 05:00 · JFK 08:00
    Developed with CodeLauncher
    ♥ Do have faith in what you're doing.