pywinpty 3.0.1__cp313-cp313-win_amd64.whl → 3.0.2__cp313-cp313-win_amd64.whl

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.
@@ -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
+ [![Project License - MIT](https://img.shields.io/pypi/l/pywinpty.svg)](./LICENSE.txt)
25
+ [![pypi version](https://img.shields.io/pypi/v/pywinpty.svg)](https://pypi.org/project/pywinpty/)
26
+ [![conda version](https://img.shields.io/conda/vn/conda-forge/pywinpty.svg)](https://www.anaconda.com/download/)
27
+ [![download count](https://img.shields.io/conda/dn/conda-forge/pywinpty.svg)](https://www.anaconda.com/download/)
28
+ [![Downloads](https://pepy.tech/badge/pywinpty)](https://pepy.tech/project/pywinpty)
29
+ [![PyPI status](https://img.shields.io/pypi/status/pywinpty.svg)](https://github.com/spyder-ide/pywinpty)
30
+ [![Windows tests](https://github.com/andfoy/pywinpty/actions/workflows/windows_build.yml/badge.svg)](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
+
@@ -1,6 +1,6 @@
1
- pywinpty-3.0.1.dist-info/METADATA,sha256=uv-Z7g2o5rjRo8IsY9CRa-o5hsuAXJ7ahffynf82knM,159
2
- pywinpty-3.0.1.dist-info/WHEEL,sha256=K7foeVF-x_RZTycPKa1uE1HH2bAWe3AiJbihrXn5Hhc,96
3
- pywinpty-3.0.1.dist-info/licenses/LICENSE.txt,sha256=-HjUdn-a0uQ9MIPvoAIBsADOk32e6GJuALpccqrJUeI,1088
1
+ pywinpty-3.0.2.dist-info/METADATA,sha256=GQGUvmS8yAOhFB4MNC9jjE_yBR8cGw1fVKUVRSKR-OU,5748
2
+ pywinpty-3.0.2.dist-info/WHEEL,sha256=K7foeVF-x_RZTycPKa1uE1HH2bAWe3AiJbihrXn5Hhc,96
3
+ pywinpty-3.0.2.dist-info/licenses/LICENSE.txt,sha256=-HjUdn-a0uQ9MIPvoAIBsADOk32e6GJuALpccqrJUeI,1088
4
4
  winpty/OpenConsole.exe,sha256=6Dg0D2Gj8O-6rBrxtvgb31jYQDGM0fB2GQIlWrtWqmE,1148472
5
5
  winpty/__init__.py,sha256=laTi9sLjCLycyaQYO3wMvhZNIK2vh_pOvGTJT2Od4Qs,402
6
6
  winpty/conpty.dll,sha256=kliUMMhwG7vUzGvzCV_o8GdlaIh13W7EK6VKWwdHHoU,109624
@@ -10,7 +10,7 @@ winpty/tests/__init__.py,sha256=fzb9cDnPt2R3b_rWh6sqDgIbiQOZtBlfsV1aq-ULT2Q,53
10
10
  winpty/tests/test_pty.py,sha256=f6UKatWALTFM7jvcrqYWsRFCxosT-Aj0ChhvkN97ov4,3850
11
11
  winpty/tests/test_ptyprocess.py,sha256=QP0I-gufNV7OaZZFpRIC9J1XD4nq86NrR3oqi9s4OEI,5981
12
12
  winpty/winpty-agent.exe,sha256=REZ6g9hrYSe8e4duiy-zP6df3gnZuf8nx_jvhLqWmyk,2627338
13
- winpty/winpty.cp313-win_amd64.pyd,sha256=uz9tkIFqQgNENBjvtjNh56YfuvlGEaCJ3kxZiK5XIJo,581120
13
+ winpty/winpty.cp313-win_amd64.pyd,sha256=2wZhG8mIO9LeEmOXdP-ncfC1Q-bBI2X_jnRNZN38APg,581120
14
14
  winpty/winpty.dll,sha256=UXfzIarC-oVDbdbsa_xtQUWdJfW1M6oDNJ71E0YbTHk,2509089
15
15
  winpty/winpty.pyi,sha256=N8sy5oYzQGwtekPUSZ8Ai6Z9l3TcpNv-VOMjhRHByhs,1500
16
- pywinpty-3.0.1.dist-info/RECORD,,
16
+ pywinpty-3.0.2.dist-info/RECORD,,
Binary file
@@ -1,6 +0,0 @@
1
- Metadata-Version: 2.4
2
- Name: pywinpty
3
- Version: 3.0.1
4
- License-File: LICENSE.txt
5
- Summary: Pseudo terminal support for Windows from Python.
6
- Requires-Python: >=3.9