terminal-emulator

Python terminal emulation

依然范特西╮ 提交于 2019-12-12 08:49:55
问题 I'd like to have an xterm-compatible virtual terminal running inside a Python app. I'll need to run ncurses-based applications inside it, feed it with user's input and read its output. So far I've found python-vte, but it only provides a GTK+ widget (libvte has the required VtePty class, but Python bindings don't) and has an unacceptable libgtk dependency. Is there any other way to perform a teminal emulation in Python? 回答1: After all, I've found the pyte, which is exactly what I wanted. 回答2:

How to simulate a terminal in Android using Kivy?

余生颓废 提交于 2019-12-12 03:46:25
问题 I'm trying to build a Android terminal emulator using Kivy, for now, I can use some simple commands, like ping and wget , and grab their output using subprocess.PIPE , but I can't figure out how to use more complex commands like su or nano . For instance, su gives a error saying that is must be run in a terminal. What I have create a Android terminal emulator using Kivy? 来源: https://stackoverflow.com/questions/40755167/how-to-simulate-a-terminal-in-android-using-kivy

Cannot open /data folder in a rooted Android device

微笑、不失礼 提交于 2019-12-10 10:39:42
问题 My HTC Sensation is rooted (I can see the SuperUser app; I can su using the Terminal Emulator app; I was able to install Android Stock ROM Cyanogenmod). I'm not able to open the /data folder using either ADT or adb shell su (permission denied) or File Expert app. What can I do to open the folder? 回答1: I found the answer and solution: As for access the adb shell , I need to enable "Root access" for ADB in "Developer options" (this apply for stock Android 4.0.4 by Cyanogenmod but the same

Embed xterm into QWidget and communicate with it

a 夏天 提交于 2019-12-10 09:59:14
问题 I want to embed an xterm into a pyqt4 widget and communicate with it. Especially I want to be able to print to it and execute commands on it (such that it returns to normal user prompt after executing the command just like a normal shell would do). Consider the following minimal example. How can I make it work? #!/usr/bin/env python #-*- coding:utf-8 -*- import sys from PyQt4.QtCore import * from PyQt4.QtGui import * class embedxterm(QWidget): def __init__(self): QWidget.__init__(self) self

Why does shell mode display some rubbish code?

≡放荡痞女 提交于 2019-12-08 03:36:52
问题 When I use bower in M-x shell , as you can see in the picture, some rubbish code is displayed. However M-x ansi-term works well What could be the problem ? Is it possible to make shell mode display properly ? 回答1: Those symbols are ANSI escape sequences that the terminal emulator uses for visual effects like changing the color of text. shell-mode apparently doesn't know how to display these codes by default. What you want may be Term Mode: Some programs (such as Emacs itself) need to control

roxterm emulator: Change Profile in all Active TTYs

一个人想着一个人 提交于 2019-12-08 02:02:23
问题 The terminal emulator roxterm saves an environment variable containing an unique id for each tty session. e.g: echo $ROXTERM_ID 0x26d39e0 This is needed in order to send dbus messages to roxterm, which will take effect only for this particular tty. According to the manual settings of the current tty can be changed like so: dbus-send --session /net/sf/roxterm/Options net.sf.roxterm.Options.SetColourScheme string:$ROXTERM_ID string:Tango This changes the color theme to "Tango". It works. How

Connecting to CICS from Windows Desktop Application

馋奶兔 提交于 2019-12-07 16:11:45
问题 Now there is a new requirement. I have got some adhoc work at hand. The requirement is to connect a desktop based Java application to read data from Mainframe generated by some CICS Transaction. [Basically I have to read all the records being appended into a file (same way as we do tail-f filename in linux). This is just for FYI my requirement is something different.] I inquired, and came to know that my employer cannot provide MQ or CICS Transaction Gateway access to me. He suggested some

how to get root access on android 2.3 emulator

跟風遠走 提交于 2019-12-07 11:00:46
问题 i am trying to get root access on my android emulator to run iptables. i went through many forums and tried many methods but nothing seems to work. the following is my device specification and i try everything on emulator. version - 2.3 kernel version - 2.6.29-00261-g0097074-dirtydigit@digit #20 build number - sdk-eng 2.3 GRH55 79397 test-keys so how to become root in the android. please help. 回答1: On the emulator provided with the SDK r10, you can get a root shell executing "adb shell" from

Embed interactive shell (VTE) in a PyGtk GUI to manipulate its own widgets

送分小仙女□ 提交于 2019-12-06 16:08:47
I am planning to do the folliwing: 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. The result would be similar to using AutoCAD's commands, only that I would be acting upon the GUI objects. 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

roxterm emulator: Change Profile in all Active TTYs

坚强是说给别人听的谎言 提交于 2019-12-06 11:09:49
The terminal emulator roxterm saves an environment variable containing an unique id for each tty session. e.g: echo $ROXTERM_ID 0x26d39e0 This is needed in order to send dbus messages to roxterm, which will take effect only for this particular tty. According to the manual settings of the current tty can be changed like so: dbus-send --session /net/sf/roxterm/Options net.sf.roxterm.Options.SetColourScheme string:$ROXTERM_ID string:Tango This changes the color theme to "Tango". It works. How can I change all currently open roxterm windows in the same way? According to the manual dbus-send -