如何在Linux中编写文本模式gui? [英] How to write a text mode gui in Linux?

查看:290
本文介绍了如何在Linux中编写文本模式gui?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当我编写脚本/程序时,我经常想弹出一个简单的文字'gui'来提示输入: //i.stack.imgur.com/RPvZe.pngrel =nofollow noreferrer>



我会如何做到这一点?例如来自Shell,Ruby,Golang或C,我甚至不知道这是叫什么,Google也不会回应脚本中的文字。



(该示例来自Debian安装程序)。

解决方案

实际上,这不是对话框,但蝾螈图书馆(外观上有一些差异)。它在Red Hat系统上由 anaconda 使用。 whiptail程序使用库,但它与anaconda没有真正的关系。



Anaconda主要使用Python,它使用Python绑定中的newt共享库(用C语言编写)。



为了学习它,文档基本上是不存在的。你有源代码。

进一步阅读:


When I write scripts/programs, often I would like to pop up a simple text 'gui' to prompt for input:

How would I do this? For example from Shell, Ruby, Golang or C. I don't even know what this is called and Google isn't reponding to "text thingy from scripts".

(The example is from the Debian installer).

解决方案

Actually, that is not dialog, but the newt library (there are a few differences in appearance). It is used by anaconda on Red Hat systems. The whiptail program uses the library, however it has no real relationship to anaconda.

Anaconda is mostly in Python; it uses the newt shared library (written in C) from a Python binding.

For learning it... documentation is largely non-existent. You have the source code.

Further reading:

这篇关于如何在Linux中编写文本模式gui?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆