tktermwidget


Nametktermwidget JSON
Version 0.0.4 PyPI version JSON
download
home_pagehttps://github.com/littlewhitecloud/TkTerminal
SummaryA terminal emulator for Tkinter
upload_time2023-06-27 06:24:32
maintainer
docs_urlNone
authorlittlewhitecloud
requires_python
license
keywords
VCS
bugtrack_url
requirements platformdirs
Travis-CI No Travis.
coveralls test coverage No coveralls.
            <h1 align="center"> TkTerminal </h1>

[![PyPI](https://img.shields.io/pypi/v/tktermwidget)](https://pypi.org/project/tktermwidget)
![Platform](https://img.shields.io/powershellgallery/p/Pester?color=blue)

### 🌏 [简体中文](README_CH.md)

```TkTerminal``` is a terminal emulator written in Python using tkinter. It is quite easy to use.
### Windows
<img src="images/windows.png" width="75%" align="center">

### MacOS
<img src="images/macos.png" width="85%" align="center">

## Features
- User can set the terminal widget with their own options
- Use \ to make new lines (On Windows it is &&)
- Command history recorder
- Styles
- And some on

## Future ideas
- Highlight

## Styles
```tkterminalwidget``` also have some styles to use such as ```Powershell``` ```Command```:
![image](https://github.com/littlewhitecloud/TkTerminal/assets/71159641/3affd018-0408-4e91-96de-4775937e0ab8)


## Installation:
```batch
pip install tktermwidget
```

## Example:
```python
from tkinter import Tk

from tkterm import Terminal

# Create root window
root = Tk()

# Hide root window during initialization
root.withdraw()

# Set title
root.title("Terminal")

# Create terminal
term = Terminal(root)
term.pack(expand=True, fill="both")

# Set minimum size and center app

# Update widgets so minimum size is accurate
root.update_idletasks()

# Get minimum size
minimum_width: int = root.winfo_reqwidth()
minimum_height: int = root.winfo_reqheight()

# Get center of screen based on minimum size
x_coords = int(root.winfo_screenwidth() / 2 - minimum_width / 2)
y_coords = int(root.wm_maxsize()[1] / 2 - minimum_height / 2)

# Place app and make the minimum size the actual minimum size (non-infringable)
root.geometry(f"{minimum_width}x{minimum_height}+{x_coords}+{y_coords}")
root.wm_minsize(minimum_width, minimum_height)

# Show root window
root.deiconify()

# Start mainloop
root.mainloop()
```


            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/littlewhitecloud/TkTerminal",
    "name": "tktermwidget",
    "maintainer": "",
    "docs_url": null,
    "requires_python": "",
    "maintainer_email": "",
    "keywords": "",
    "author": "littlewhitecloud",
    "author_email": "",
    "download_url": "https://files.pythonhosted.org/packages/30/65/80931d638e4b9d571d614f6a8a67e6975a094a64658c05d64a1f78ce5944/tktermwidget-0.0.4.tar.gz",
    "platform": null,
    "description": "<h1 align=\"center\"> TkTerminal </h1>\n\n[![PyPI](https://img.shields.io/pypi/v/tktermwidget)](https://pypi.org/project/tktermwidget)\n![Platform](https://img.shields.io/powershellgallery/p/Pester?color=blue)\n\n### \ud83c\udf0f [\u7b80\u4f53\u4e2d\u6587](README_CH.md)\n\n```TkTerminal``` is a terminal emulator written in Python using tkinter. It is quite easy to use.\n### Windows\n<img src=\"images/windows.png\" width=\"75%\" align=\"center\">\n\n### MacOS\n<img src=\"images/macos.png\" width=\"85%\" align=\"center\">\n\n## Features\n- User can set the terminal widget with their own options\n- Use \\ to make new lines (On Windows it is &&)\n- Command history recorder\n- Styles\n- And some on\n\n## Future ideas\n- Highlight\n\n## Styles\n```tkterminalwidget``` also have some styles to use such as ```Powershell``` ```Command```:\n![image](https://github.com/littlewhitecloud/TkTerminal/assets/71159641/3affd018-0408-4e91-96de-4775937e0ab8)\n\n\n## Installation:\n```batch\npip install tktermwidget\n```\n\n## Example:\n```python\nfrom tkinter import Tk\n\nfrom tkterm import Terminal\n\n# Create root window\nroot = Tk()\n\n# Hide root window during initialization\nroot.withdraw()\n\n# Set title\nroot.title(\"Terminal\")\n\n# Create terminal\nterm = Terminal(root)\nterm.pack(expand=True, fill=\"both\")\n\n# Set minimum size and center app\n\n# Update widgets so minimum size is accurate\nroot.update_idletasks()\n\n# Get minimum size\nminimum_width: int = root.winfo_reqwidth()\nminimum_height: int = root.winfo_reqheight()\n\n# Get center of screen based on minimum size\nx_coords = int(root.winfo_screenwidth() / 2 - minimum_width / 2)\ny_coords = int(root.wm_maxsize()[1] / 2 - minimum_height / 2)\n\n# Place app and make the minimum size the actual minimum size (non-infringable)\nroot.geometry(f\"{minimum_width}x{minimum_height}+{x_coords}+{y_coords}\")\nroot.wm_minsize(minimum_width, minimum_height)\n\n# Show root window\nroot.deiconify()\n\n# Start mainloop\nroot.mainloop()\n```\n\n",
    "bugtrack_url": null,
    "license": "",
    "summary": "A terminal emulator for Tkinter",
    "version": "0.0.4",
    "project_urls": {
        "Homepage": "https://github.com/littlewhitecloud/TkTerminal"
    },
    "split_keywords": [],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "70ca23284bccf70aee33378febeef8f7f3e68666a2d78168b2819fc60df8312a",
                "md5": "854c2374f53d5712ea974d4c91193ac9",
                "sha256": "dc0a679435a1778f831e11f1acc882403d3ac586d743897e79b4d1d034583609"
            },
            "downloads": -1,
            "filename": "tktermwidget-0.0.4-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "854c2374f53d5712ea974d4c91193ac9",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": null,
            "size": 6971,
            "upload_time": "2023-06-27T06:24:31",
            "upload_time_iso_8601": "2023-06-27T06:24:31.397363Z",
            "url": "https://files.pythonhosted.org/packages/70/ca/23284bccf70aee33378febeef8f7f3e68666a2d78168b2819fc60df8312a/tktermwidget-0.0.4-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "306580931d638e4b9d571d614f6a8a67e6975a094a64658c05d64a1f78ce5944",
                "md5": "7af7927635a7a4d69afd1ad615b18d34",
                "sha256": "2d8a9554f9bef011a17df81540efad910052690bcec322bbf3f259af25409764"
            },
            "downloads": -1,
            "filename": "tktermwidget-0.0.4.tar.gz",
            "has_sig": false,
            "md5_digest": "7af7927635a7a4d69afd1ad615b18d34",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": null,
            "size": 6240,
            "upload_time": "2023-06-27T06:24:32",
            "upload_time_iso_8601": "2023-06-27T06:24:32.869810Z",
            "url": "https://files.pythonhosted.org/packages/30/65/80931d638e4b9d571d614f6a8a67e6975a094a64658c05d64a1f78ce5944/tktermwidget-0.0.4.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2023-06-27 06:24:32",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "littlewhitecloud",
    "github_project": "TkTerminal",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "requirements": [
        {
            "name": "platformdirs",
            "specs": []
        }
    ],
    "lcname": "tktermwidget"
}
        
Elapsed time: 0.10186s