Giter Club home page Giter Club logo

tkterm's Introduction

TkTerm - Tkinter Terminal Emulator

A fully functional terminal emulator built on Tkinter library - perform all basic commands of a terminal

Under the hood it executes commands using Python's subprocess module and spawn as a thread. Pressing Ctrl-Cwill terminate current running command. Supports Unix shells (bash and C-Shell) and Window's Command Prompt (cmd.exe) commands.

Features

  • Compatible with Windows and Unix systems
  • Return Code (RC) of previous run commands is shown at the bottom status bar
  • Ctrl-C to kill current running process
  • Ctrl-F to search; supports case sensitivity and regex searches
  • UP and DOWN arrow keys to cycle between next and previous commands in history
  • Unix-like tab completion on files and directories
  • Handles multiline commands using caret character ^ or \

Requirements

The Tkinter GUI library is built into Python, so no 3rd party library is required.

Requires at least Python version 3 and above.

Standalone usage

Run standalone script simply with

$> python tkterm.py

Integration with other Tkinter application

The Terminal is implemented as a Frame widget and can be easily be integrated to other Tkinter application by

import tkinter as tk
from tkinter import *
from tkterm import Terminal

root = tk.Tk()

terminal = Terminal(root)
terminal.pack(fill=BOTH, expand=True)

root.mainloop()

Customisation options

-TODO-

Multiline command

Long lines of command can be broken up using a caret. A caret at the line end appends the next line command with the current command. In Windows the caret is ^, and UNIX is \.

For multiline command to be considered there must be no trailing space after the caret, for example:

  • $> ping ^ is considered
  • $> ping ^ is not considered
$>> echo I ^
> have apple ^
> and banana
I have apple and banana

tkterm's People

Contributors

dhanoosu avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.