pywinpty 3.0.1__tar.gz → 3.0.2__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {pywinpty-3.0.1 → pywinpty-3.0.2}/CHANGELOG.md +10 -0
- {pywinpty-3.0.1 → pywinpty-3.0.2}/Cargo.lock +1 -1
- {pywinpty-3.0.1 → pywinpty-3.0.2}/Cargo.toml +1 -1
- pywinpty-3.0.2/PKG-INFO +160 -0
- pywinpty-3.0.2/pyproject.toml +29 -0
- pywinpty-3.0.1/PKG-INFO +0 -6
- pywinpty-3.0.1/pyproject.toml +0 -8
- {pywinpty-3.0.1 → pywinpty-3.0.2}/.github/FUNDING.yml +0 -0
- {pywinpty-3.0.1 → pywinpty-3.0.2}/.github/dependabot.yml +0 -0
- {pywinpty-3.0.1 → pywinpty-3.0.2}/.github/scripts/copy_winpty.sh +0 -0
- {pywinpty-3.0.1 → pywinpty-3.0.2}/.github/workflows/linux_sdist.yml +0 -0
- {pywinpty-3.0.1 → pywinpty-3.0.2}/.github/workflows/windows_build.yml +0 -0
- {pywinpty-3.0.1 → pywinpty-3.0.2}/.github/workflows/windows_release.yml +0 -0
- {pywinpty-3.0.1 → pywinpty-3.0.2}/.gitignore +0 -0
- {pywinpty-3.0.1 → pywinpty-3.0.2}/LICENSE.txt +0 -0
- {pywinpty-3.0.1 → pywinpty-3.0.2}/MANIFEST.in +0 -0
- {pywinpty-3.0.1 → pywinpty-3.0.2}/README.md +0 -0
- {pywinpty-3.0.1 → pywinpty-3.0.2}/RELEASE.md +0 -0
- {pywinpty-3.0.1 → pywinpty-3.0.2}/build.rs +0 -0
- {pywinpty-3.0.1 → pywinpty-3.0.2}/nuget.config +0 -0
- {pywinpty-3.0.1 → pywinpty-3.0.2}/runtests.py +0 -0
- {pywinpty-3.0.1 → pywinpty-3.0.2}/src/lib.rs +0 -0
- {pywinpty-3.0.1 → pywinpty-3.0.2}/winpty/__init__.py +0 -0
- {pywinpty-3.0.1 → pywinpty-3.0.2}/winpty/enums.py +0 -0
- {pywinpty-3.0.1 → pywinpty-3.0.2}/winpty/ptyprocess.py +0 -0
- {pywinpty-3.0.1 → pywinpty-3.0.2}/winpty/tests/__init__.py +0 -0
- {pywinpty-3.0.1 → pywinpty-3.0.2}/winpty/tests/test_pty.py +0 -0
- {pywinpty-3.0.1 → pywinpty-3.0.2}/winpty/tests/test_ptyprocess.py +0 -0
- {pywinpty-3.0.1 → pywinpty-3.0.2}/winpty/winpty.pyi +0 -0
|
@@ -1,3 +1,13 @@
|
|
|
1
|
+
## Version 3.0.2 (2025/10/03)
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
### Pull Requests Merged
|
|
5
|
+
|
|
6
|
+
* [PR 541](https://github.com/andfoy/pywinpty/pull/541) - Add README section in pyproject.toml, by [@andfoy](https://github.com/andfoy)
|
|
7
|
+
|
|
8
|
+
In this release 1 pull request was closed.
|
|
9
|
+
|
|
10
|
+
|
|
1
11
|
## Version 3.0.1 (2025/10/03)
|
|
2
12
|
|
|
3
13
|
|
pywinpty-3.0.2/PKG-INFO
ADDED
|
@@ -0,0 +1,160 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: pywinpty
|
|
3
|
+
Version: 3.0.2
|
|
4
|
+
Classifier: Development Status :: 5 - Production/Stable
|
|
5
|
+
Classifier: Programming Language :: Python
|
|
6
|
+
Classifier: License :: OSI Approved :: MIT License
|
|
7
|
+
Classifier: Operating System :: Microsoft :: Windows
|
|
8
|
+
Classifier: Programming Language :: Python :: Free Threading
|
|
9
|
+
Classifier: Programming Language :: Python :: 3
|
|
10
|
+
Classifier: Topic :: Terminals
|
|
11
|
+
Classifier: Topic :: Terminals :: Terminal Emulators/X Terminals
|
|
12
|
+
Classifier: Programming Language :: Rust
|
|
13
|
+
License-File: LICENSE.txt
|
|
14
|
+
Summary: Pseudo terminal support for Windows from Python.
|
|
15
|
+
Keywords: PTY,Windows,pseudo-terminal,PyO3
|
|
16
|
+
Author: Edgar Margffoy
|
|
17
|
+
Author-email: andfoy@gmail.com
|
|
18
|
+
Maintainer-email: Edgar Margffoy <andfoy@gmail.com>
|
|
19
|
+
Requires-Python: >=3.9
|
|
20
|
+
Description-Content-Type: text/markdown; charset=UTF-8; variant=GFM
|
|
21
|
+
|
|
22
|
+
# PyWinpty: Pseudoterminals for Windows in Python
|
|
23
|
+
|
|
24
|
+
[](./LICENSE.txt)
|
|
25
|
+
[](https://pypi.org/project/pywinpty/)
|
|
26
|
+
[](https://www.anaconda.com/download/)
|
|
27
|
+
[](https://www.anaconda.com/download/)
|
|
28
|
+
[](https://pepy.tech/project/pywinpty)
|
|
29
|
+
[](https://github.com/spyder-ide/pywinpty)
|
|
30
|
+
[](https://github.com/andfoy/pywinpty/actions/workflows/windows_build.yml)
|
|
31
|
+
|
|
32
|
+
*Copyright © 2017–2022 Spyder Project Contributors*
|
|
33
|
+
*Copyright © 2022– Edgar Andrés Margffoy Tuay*
|
|
34
|
+
|
|
35
|
+
|
|
36
|
+
## Overview
|
|
37
|
+
|
|
38
|
+
PyWinpty allows creating and communicating with Windows processes that receive input and print outputs via console input and output pipes. PyWinpty supports both the native [ConPTY](https://devblogs.microsoft.com/commandline/windows-command-line-introducing-the-windows-pseudo-console-conpty/) interface and the previous, fallback [winpty](https://github.com/rprichard/winpty) library.
|
|
39
|
+
|
|
40
|
+
|
|
41
|
+
## Dependencies
|
|
42
|
+
To compile pywinpty sources, you must have [Rust](https://rustup.rs/) installed.
|
|
43
|
+
Optionally, you can also have Winpty's C header and library files available on your include path.
|
|
44
|
+
|
|
45
|
+
|
|
46
|
+
## Installation
|
|
47
|
+
You can install this library by using conda or pip package managers, as it follows:
|
|
48
|
+
|
|
49
|
+
Using conda (Recommended):
|
|
50
|
+
```bash
|
|
51
|
+
conda install pywinpty
|
|
52
|
+
```
|
|
53
|
+
|
|
54
|
+
Using pip:
|
|
55
|
+
```bash
|
|
56
|
+
pip install pywinpty
|
|
57
|
+
```
|
|
58
|
+
|
|
59
|
+
## Building from source
|
|
60
|
+
|
|
61
|
+
To build from sources, you will require both a working stable or nightly Rust toolchain with
|
|
62
|
+
target `x86_64-pc-windows-msvc`, which can be installed using [rustup](https://rustup.rs/).
|
|
63
|
+
|
|
64
|
+
Optionally, this library can be linked against winpty library, which you can install using conda-forge:
|
|
65
|
+
|
|
66
|
+
```batch
|
|
67
|
+
conda install winpty -c conda-forge
|
|
68
|
+
```
|
|
69
|
+
|
|
70
|
+
If you don't want to use conda, you will need to have the winpty binaries and headers available on your PATH.
|
|
71
|
+
|
|
72
|
+
Finally, pywinpty uses [Maturin](https://github.com/PyO3/maturin) as the build backend, which can be installed using `pip`:
|
|
73
|
+
|
|
74
|
+
```batch
|
|
75
|
+
pip install maturin
|
|
76
|
+
```
|
|
77
|
+
|
|
78
|
+
To test your compilation environment settings, you can build pywinpty sources locally, by
|
|
79
|
+
executing:
|
|
80
|
+
|
|
81
|
+
```bash
|
|
82
|
+
maturin develop
|
|
83
|
+
```
|
|
84
|
+
|
|
85
|
+
This package depends on the following Rust crates:
|
|
86
|
+
|
|
87
|
+
* [PyO3](https://github.com/PyO3/pyo3): Library used to produce Python bindings from Rust code.
|
|
88
|
+
* [WinPTY-rs](https://github.com/andfoy/winpty-rs): Create and spawn processes inside a pseudoterminal in Windows from Rust.
|
|
89
|
+
* [Maturin](https://github.com/PyO3/maturin): Build system to build and publish Rust-based Python packages.
|
|
90
|
+
|
|
91
|
+
## Package usage
|
|
92
|
+
Pywinpty offers a single python wrapper around winpty library functions.
|
|
93
|
+
This implies that using a single object (``winpty.PTY``) it is possible to access to all functionality, as it follows:
|
|
94
|
+
|
|
95
|
+
```python
|
|
96
|
+
# High level usage using `spawn`
|
|
97
|
+
from winpty import PtyProcess
|
|
98
|
+
|
|
99
|
+
proc = PtyProcess.spawn('python')
|
|
100
|
+
proc.write('print("hello, world!")\r\n')
|
|
101
|
+
proc.write('exit()\r\n')
|
|
102
|
+
while proc.isalive():
|
|
103
|
+
print(proc.readline())
|
|
104
|
+
|
|
105
|
+
# Low level usage using the raw `PTY` object
|
|
106
|
+
from winpty import PTY
|
|
107
|
+
|
|
108
|
+
# Start a new winpty-agent process of size (cols, rows)
|
|
109
|
+
cols, rows = 80, 25
|
|
110
|
+
process = PTY(cols, rows)
|
|
111
|
+
|
|
112
|
+
# Spawn a new console process, e.g., CMD
|
|
113
|
+
process.spawn(br'C:\windows\system32\cmd.exe')
|
|
114
|
+
|
|
115
|
+
# Read console output (Unicode)
|
|
116
|
+
process.read()
|
|
117
|
+
|
|
118
|
+
# Write input to console (Unicode)
|
|
119
|
+
process.write(b'Text')
|
|
120
|
+
|
|
121
|
+
# Resize console size
|
|
122
|
+
new_cols, new_rows = 90, 30
|
|
123
|
+
process.set_size(new_cols, new_rows)
|
|
124
|
+
|
|
125
|
+
# Know if the process is alive
|
|
126
|
+
alive = process.isalive()
|
|
127
|
+
|
|
128
|
+
# End winpty-agent process
|
|
129
|
+
del process
|
|
130
|
+
```
|
|
131
|
+
|
|
132
|
+
## Running tests
|
|
133
|
+
We use pytest to run tests as it follows (after calling ``maturin develop``), the test suite depends
|
|
134
|
+
on pytest-lazy-fixture, which can be installed via pip:
|
|
135
|
+
|
|
136
|
+
```batch
|
|
137
|
+
pip install pytest pytest-lazy-fixture flaky
|
|
138
|
+
```
|
|
139
|
+
|
|
140
|
+
All the tests can be executed using the following command
|
|
141
|
+
|
|
142
|
+
```bash
|
|
143
|
+
python runtests.py
|
|
144
|
+
```
|
|
145
|
+
|
|
146
|
+
|
|
147
|
+
## Changelog
|
|
148
|
+
Visit our [CHANGELOG](CHANGELOG.md) file to learn more about our new features and improvements.
|
|
149
|
+
|
|
150
|
+
|
|
151
|
+
## Contribution guidelines
|
|
152
|
+
We follow PEP8 and PEP257 for pure python packages and Rust to compile extensions. We use MyPy type annotations for all functions and classes declared on this package. Feel free to send a PR or create an issue if you have any problem/question.
|
|
153
|
+
|
|
154
|
+
|
|
155
|
+
## Security contact information
|
|
156
|
+
|
|
157
|
+
To report a security vulnerability, please use the
|
|
158
|
+
[Tidelift security contact](https://tidelift.com/security).
|
|
159
|
+
Tidelift will coordinate the fix and disclosure.
|
|
160
|
+
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
[project]
|
|
2
|
+
name = "pywinpty"
|
|
3
|
+
readme = "README.md"
|
|
4
|
+
requires-python = ">=3.9"
|
|
5
|
+
dynamic = ["version", "description"]
|
|
6
|
+
classifiers = [
|
|
7
|
+
"Development Status :: 5 - Production/Stable",
|
|
8
|
+
"Programming Language :: Python",
|
|
9
|
+
"License :: OSI Approved :: MIT License",
|
|
10
|
+
"Operating System :: Microsoft :: Windows",
|
|
11
|
+
"Programming Language :: Python :: Free Threading",
|
|
12
|
+
"Programming Language :: Python :: 3",
|
|
13
|
+
"Topic :: Terminals",
|
|
14
|
+
"Topic :: Terminals :: Terminal Emulators/X Terminals",
|
|
15
|
+
"Programming Language :: Rust"
|
|
16
|
+
|
|
17
|
+
]
|
|
18
|
+
keywords = ["PTY", "Windows", "pseudo-terminal", "PyO3"]
|
|
19
|
+
authors = [
|
|
20
|
+
{email = "andfoy@gmail.com"},
|
|
21
|
+
{name = "Edgar Margffoy"}
|
|
22
|
+
]
|
|
23
|
+
maintainers = [
|
|
24
|
+
{name = "Edgar Margffoy", email = "andfoy@gmail.com"}
|
|
25
|
+
]
|
|
26
|
+
|
|
27
|
+
[build-system]
|
|
28
|
+
requires = ["maturin>=1.1,<2.0"]
|
|
29
|
+
build-backend = "maturin"
|
pywinpty-3.0.1/PKG-INFO
DELETED
pywinpty-3.0.1/pyproject.toml
DELETED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|