https://github.com/cvzi/assertwt
Run a Python script in Windows Terminal wt.exe
https://github.com/cvzi/assertwt
python windows-console windows-terminal
Last synced: 3 months ago
JSON representation
Run a Python script in Windows Terminal wt.exe
- Host: GitHub
- URL: https://github.com/cvzi/assertwt
- Owner: cvzi
- License: unlicense
- Created: 2022-04-24T20:51:09.000Z (about 3 years ago)
- Default Branch: main
- Last Pushed: 2023-02-02T16:43:37.000Z (over 2 years ago)
- Last Synced: 2025-04-15T06:52:34.631Z (3 months ago)
- Topics: python, windows-console, windows-terminal
- Language: Python
- Homepage: https://pypi.org/project/AssertWT/
- Size: 380 KB
- Stars: 4
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
AssertWT
========Assert that a Python script is run in the Windows Terminal 'wt.exe' instead
of the standard 'conhost.exe' console.```python
>>> import assertwt
>>> assertwt.restart()
```By default the script is run with cmd.exe and the window is closed when the
script ends.```python
# Default behaviour: cmd.exe and window closes after script:
assertwt.restart(["wt", "-d", assertwt.CD, "cmd", "/C", assertwt.ARGV])# cmd.exe and windows does not close after script:
assertwt.restart(["wt", "-d", assertwt.CD, "cmd", "/K", assertwt.ARGV])# Powershell and window closes after script:
assertwt.restart(["wt", "-d", assertwt.CD, "powershell", "-Command", assertwt.ARGV])# Powershell and windows does not close after script:
assertwt.restart(["wt", "-d", assertwt.CD, "powershell", "-NoExit", "-Command", assertwt.ARGV])# New tab in existing Windows Terminal window:
assertwt.restart(["wt", "new-tab", "-d", assertwt.CD, "cmd", "/K", assertwt.ARGV])```
Install
-------```shell
pip install assertwt
```See: [https://pypi.org/project/assertwt/](https://pypi.org/project/assertwt/)
Documentation
-------------https://assertwt.readthedocs.io