Run a Python script in Windows Terminal wt.exe
Project description
AssertWT
Assert that a Python script is run in the Windows Terminal 'wt.exe' instead of the standard 'conhost.exe' console.
>>> import assertwt
>>> assertwt.restart()
By default the script is run with cmd.exe and the window is closed when the script ends.
# 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
pip install assertwt
See: https://pypi.org/project/assertwt/
Documentation
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distributions
No source distribution files available for this release.See tutorial on generating distribution archives.
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file AssertWT-2.1.0-py3-none-any.whl.
File metadata
- Download URL: AssertWT-2.1.0-py3-none-any.whl
- Upload date:
- Size: 4.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.11.1
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
6603cbf9438a5dde6f799f9b706d3d6c4c3646012bdc64bb923853fb5a4f4469
|
|
| MD5 |
afa26b28d66e742016beb6a9a3542d8d
|
|
| BLAKE2b-256 |
3401973f8be9a2680079c575c27ce8e04178c689b54bc05124015865844c920f
|