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 Distribution
AssertWT-2.3.1.tar.gz
(3.5 kB
view details)
Built Distribution
File details
Details for the file AssertWT-2.3.1.tar.gz
.
File metadata
- Download URL: AssertWT-2.3.1.tar.gz
- Upload date:
- Size: 3.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.11.1
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3796fb65a26967f595d8bc9d5457d0567be9d1149551f9bebb32d5ffda85d573 |
|
MD5 | 0426af8b78f7e36a5ded070541c7f407 |
|
BLAKE2b-256 | c1e8474ecac65e087693991e2dac2ac1399a4754e5f4cc58aa3eb399a646c562 |
File details
Details for the file AssertWT-2.3.1-py3-none-any.whl
.
File metadata
- Download URL: AssertWT-2.3.1-py3-none-any.whl
- Upload date:
- Size: 4.6 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 | 5de0892078f9637addf03067fde163f3be055a87aa4d6726968d46e3b54db75f |
|
MD5 | 76222a566e77ccfd77a6019420d68255 |
|
BLAKE2b-256 | ab920f04b37412cdd7f1c6f4f26c040d6db4d044a12946d5318ab0fd115f7f40 |