tkterm


Nametkterm JSON
Version 0.0.0b2 PyPI version JSON
download
home_pagehttps://github.com/dhanoosu/tkterm
SummaryTerminal emulator built on Tkinter library.
upload_time2023-04-23 23:18:16
maintainer
docs_urlNone
authorDhanoo Surasarang
requires_python
licenseMIT
keywords linux shell bash cli gui terminal command-line tkinter subprocess tkinter-graphic-interface terminal-emulator ttk commandprompt tkinter-gui tkinter-python tkinter-terminal tk-terminal tkinter-shell tkterminal
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            [![PyPI](https://img.shields.io/pypi/v/tkterm)](https://pypi.org/project/tkterm)
![PyPI - Python Version](https://img.shields.io/pypi/pyversions/tkterm)
![Platform](https://img.shields.io/powershellgallery/p/Pester?color=blue)

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

<p align="center">
<img src="https://raw.githubusercontent.com/dhanoosu/TkTerm/master/tkterm/img/snapshot2.png">
</p>

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

## Features
- Compatible with Windows and Unix systems
- Tabbed Terminal - `click & drag` to reorder, `middle-click` to close tab, `double-click` to rename
- Return Code (RC) of previous run commands is shown at the bottom status bar
- Settings to customise colours, font and cursor shape
- **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.x and above.

## Installation
Get it from Github or PIP package manager

```bash
# From github
git clone https://github.com/dhanoosu/TkTerm.git

# From package manager
pip install tkterm
```

## Standalone usage
Navigate to downloaded folder and run script with

```bash
cd TkTerm

# Either of these will work
python tkterm
python tkterm/tkterm.py
```

If package was installed via pip

```bash
python -m tkterm
```

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

```python
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()
```

> If downloaded via github append to system path before import
> ```python
> import sys
> sys.path.insert(0, "./TkTerm")
> from tkterm import Terminal
> ```

## Customisation options
Customise Terminal interface by `Right-click > Settings...`

<p align="center">
<img src="https://raw.githubusercontent.com/dhanoosu/TkTerm/master/tkterm/img/settings.png">
</p>

**Note**: \
Clicking `Save config` saves setting configuration to a file.\
Tkterm will automatically load this file the next time it starts up.

## 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

```bash
$>> echo I ^
> have apple ^
> and banana
I have apple and banana
```

## Author

Developed by Dhanoo Surasarang

Github: [@dhanoosu](https://github.com/dhanoosu)

## Links

- **GitHub:** https://github.com/dhanoosu/TkTerm

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/dhanoosu/tkterm",
    "name": "tkterm",
    "maintainer": "",
    "docs_url": null,
    "requires_python": "",
    "maintainer_email": "",
    "keywords": "linux,shell,bash,cli,gui,terminal,command-line,tkinter,subprocess,tkinter-graphic-interface,terminal-emulator,ttk,commandprompt,tkinter-gui,tkinter-python,tkinter-terminal,tk-terminal,tkinter-shell,tkterminal",
    "author": "Dhanoo Surasarang",
    "author_email": "dhanoo.surasarang@gmail.com",
    "download_url": "https://files.pythonhosted.org/packages/15/41/fe3224472f9bff1fb1d360e9ff656792b7e508d1850ff4b6321f8c78da47/tkterm-0.0.0b2.tar.gz",
    "platform": null,
    "description": "[![PyPI](https://img.shields.io/pypi/v/tkterm)](https://pypi.org/project/tkterm)\n![PyPI - Python Version](https://img.shields.io/pypi/pyversions/tkterm)\n![Platform](https://img.shields.io/powershellgallery/p/Pester?color=blue)\n\n# TkTerm - Tkinter Terminal Emulator\nA fully functional terminal emulator built on Tkinter library - perform all basic commands of a terminal\n\n<p align=\"center\">\n<img src=\"https://raw.githubusercontent.com/dhanoosu/TkTerm/master/tkterm/img/snapshot2.png\">\n</p>\n\nUnder the hood it executes commands using Python's *subprocess* module and spawn as a thread. Pressing `Ctrl-C` will terminate current running command. Supports Unix shells (`sh` and `bash`) and Window's Command Prompt (`cmd.exe`) commands.\n\n## Features\n- Compatible with Windows and Unix systems\n- Tabbed Terminal - `click & drag` to reorder, `middle-click` to close tab, `double-click` to rename\n- Return Code (RC) of previous run commands is shown at the bottom status bar\n- Settings to customise colours, font and cursor shape\n- **Ctrl-C** to kill current running process\n- **Ctrl-F** to search; supports case sensitivity and regex searches\n- **UP** and **DOWN** arrow keys to cycle between next and previous commands in history\n- Unix-like **tab completion** on files and directories\n- Handles **multiline commands** using caret character `^` or `\\`\n\n## Requirements\nThe Tkinter GUI library is built into Python, so no 3rd party library is required.\n\nRequires at least Python version 3.x and above.\n\n## Installation\nGet it from Github or PIP package manager\n\n```bash\n# From github\ngit clone https://github.com/dhanoosu/TkTerm.git\n\n# From package manager\npip install tkterm\n```\n\n## Standalone usage\nNavigate to downloaded folder and run script with\n\n```bash\ncd TkTerm\n\n# Either of these will work\npython tkterm\npython tkterm/tkterm.py\n```\n\nIf package was installed via pip\n\n```bash\npython -m tkterm\n```\n\n## Integration with other Tkinter application\nThe Terminal is implemented as a `Frame` widget and can easily be integrated to other Tkinter application by\n\n```python\nimport tkinter as tk\nfrom tkinter import *\nfrom tkterm import Terminal\n\nroot = tk.Tk()\n\nterminal = Terminal(root)\nterminal.pack(fill=BOTH, expand=True)\n\nroot.mainloop()\n```\n\n> If downloaded via github append to system path before import\n> ```python\n> import sys\n> sys.path.insert(0, \"./TkTerm\")\n> from tkterm import Terminal\n> ```\n\n## Customisation options\nCustomise Terminal interface by `Right-click > Settings...`\n\n<p align=\"center\">\n<img src=\"https://raw.githubusercontent.com/dhanoosu/TkTerm/master/tkterm/img/settings.png\">\n</p>\n\n**Note**: \\\nClicking `Save config` saves setting configuration to a file.\\\nTkterm will automatically load this file the next time it starts up.\n\n## Multiline command\nLong 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.\nIn Windows the caret is `^`, and UNIX is `\\`.\n\nFor multiline command to be considered there must be ***no** trailing space after the caret*, for example:\n\n- `$> ping ^` is considered\n- `$> ping ^ ` is **not** considered\n\n```bash\n$>> echo I ^\n> have apple ^\n> and banana\nI have apple and banana\n```\n\n## Author\n\nDeveloped by Dhanoo Surasarang\n\nGithub: [@dhanoosu](https://github.com/dhanoosu)\n\n## Links\n\n- **GitHub:** https://github.com/dhanoosu/TkTerm\n",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "Terminal emulator built on Tkinter library.",
    "version": "0.0.0b2",
    "split_keywords": [
        "linux",
        "shell",
        "bash",
        "cli",
        "gui",
        "terminal",
        "command-line",
        "tkinter",
        "subprocess",
        "tkinter-graphic-interface",
        "terminal-emulator",
        "ttk",
        "commandprompt",
        "tkinter-gui",
        "tkinter-python",
        "tkinter-terminal",
        "tk-terminal",
        "tkinter-shell",
        "tkterminal"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "03436cf82c3830a94e9a66e141ef0a7658f3f95af10d1f481b5323cd567b9213",
                "md5": "4c388039084c3f1da01598b0931dfc3a",
                "sha256": "7ceafad182b49de408303e8b594b4ac867627eb4944f3494dff8c60a59a1ff4e"
            },
            "downloads": -1,
            "filename": "tkterm-0.0.0b2-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "4c388039084c3f1da01598b0931dfc3a",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": null,
            "size": 146645,
            "upload_time": "2023-04-23T23:18:14",
            "upload_time_iso_8601": "2023-04-23T23:18:14.704490Z",
            "url": "https://files.pythonhosted.org/packages/03/43/6cf82c3830a94e9a66e141ef0a7658f3f95af10d1f481b5323cd567b9213/tkterm-0.0.0b2-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "1541fe3224472f9bff1fb1d360e9ff656792b7e508d1850ff4b6321f8c78da47",
                "md5": "88313f8fedd720ce1d998d41f23b67fa",
                "sha256": "52369039dfd5cbd1b0044a8593be19028f9123ea003bbd5d69aa1fb38e4e37fe"
            },
            "downloads": -1,
            "filename": "tkterm-0.0.0b2.tar.gz",
            "has_sig": false,
            "md5_digest": "88313f8fedd720ce1d998d41f23b67fa",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": null,
            "size": 139198,
            "upload_time": "2023-04-23T23:18:16",
            "upload_time_iso_8601": "2023-04-23T23:18:16.538232Z",
            "url": "https://files.pythonhosted.org/packages/15/41/fe3224472f9bff1fb1d360e9ff656792b7e508d1850ff4b6321f8c78da47/tkterm-0.0.0b2.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2023-04-23 23:18:16",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "github_user": "dhanoosu",
    "github_project": "tkterm",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "lcname": "tkterm"
}
        
Elapsed time: 0.07005s