将交互式外壳(VTE)嵌入PyGtk GUI中以操纵其自己的小部件 [英] Embed interactive shell (VTE) in a PyGtk GUI to manipulate its own widgets

查看:119
本文介绍了将交互式外壳(VTE)嵌入PyGtk GUI中以操纵其自己的小部件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在计划进行愚弄:

使用一些小部件创建一个PyGtk GUI(硬编码,没有Glade),然后在屏幕底部放置一些VTE(虚拟终端仿真器),从中可以操作这些小部件,例如更改其属性并调用它们的属性.命令行中的方法.

Create a PyGtk GUI (hardcoded, no Glade) with some widgets, and at the bottom of the screen put some sort of VTE (Virtual Terminal Emulator) from where I could manipulate the widgets, for example changing their attributes and calling their methods from the commandline.

结果将类似于使用AutoCAD的命令,只是我将对GUI对象进行操作.

The result would be similar to using AutoCAD's commands, only that I would be acting upon the GUI objects.

我已经发现关于gtk.VteTerminal小部件的东西很少,但不仅找不到一个有效的示例或自己做一个,它似乎也是系统终端,而不是我可以使用的当前会话" python终端运行python命令并访问GUI对象.

I have already found very few things about gtk.VteTerminal widget, but not only could not find a working example or make one myself, it also seem to be a system terminal, not a "current session" python terminal where I could run python commands and access GUI objects.

有什么建议吗?

感谢阅读

推荐答案

您想要的东西已经存在: GtkParasite .它是用于调试的,但是我可以确定,如果您希望它真正成为应用程序的一部分,则可以对其进行调整.

What you want exists already: GtkParasite. It's meant for debugging, but I'm sure if you wanted it to actually be a part of your application, you could adapt it.

这篇关于将交互式外壳(VTE)嵌入PyGtk GUI中以操纵其自己的小部件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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