wxPython:如何创建一个 bash shell 窗口? [英] wxPython: how to create a bash shell window?

查看:32
本文介绍了wxPython:如何创建一个 bash shell 窗口?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想使用像 bash shell 一样的 wxPython 创建一个弹出窗口.我不需要终端模拟器,不需要作业控制,我只需要基于 bash 进程的 REPL(读取、评估、打印循环).

I want to create a popup window using wxPython that acts like a bash shell. I don't want a terminal emulator, I don't need job control, I just want a REPL (Read, Eval, Print Loop) based on a bash process.

wxPython 有没有一种简单的方法可以做到这一点?我知道我作为 tcl/tk 程序员的基本概念,但我的 wxPython fu 很弱,如果我不需要,我不想重新发明轮子.我已经阅读了一些关于 py.shell 的内容.Shell 但看起来它创建了一个 python shell,我想要一个来运行 bash 命令.

Is there an easy way to do that with wxPython? I know the basic concept from my days as a tcl/tk programmer but my wxPython fu is weak and I don't want to have to reinvent the wheel if I don't have to. I've read a little about py.shell. Shell but that looks like it creates a python shell and I want one to run bash commands instead.

推荐答案

我找到了问题的解决方案.有趣的是,它以前从未出现在 Google 搜索中.这不是生产就绪代码,但最终,我正在寻找一种在 wxPython 窗口中运行 bash shell 的方法.

I found the solution to my problem. It is funny how it never turned up in Google searches before now. It's not production-ready code, but ultimately, I was looking for a way to run a bash shell in a wxPython window.

http://sivachandran.blogspot.com/2008/04/termemulator-10-released.html 网络存档https://sourceforge.net/projects/termemulator/files/TermEmulator/1.0/

这篇关于wxPython:如何创建一个 bash shell 窗口?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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