mirror of
https://github.com/clearml/wexpect-venv
synced 2025-02-07 13:30:56 +00:00
[UDT] update README to python-3
This commit is contained in:
parent
a5815fa4a8
commit
be5fa58a0e
32
README.md
32
README.md
@ -5,20 +5,26 @@
|
|||||||
*Pexpect* is a Python module for spawning child applications and controlling
|
*Pexpect* is a Python module for spawning child applications and controlling
|
||||||
them automatically.
|
them automatically.
|
||||||
|
|
||||||
|
**!! UPDATE !!**
|
||||||
|
|
||||||
|
I'm glad to announce that python-3 is supported form version 2.3.3
|
||||||
|
|
||||||
## **Install**
|
## **Install**
|
||||||
|
|
||||||
pip install wexpect
|
pip install wexpect
|
||||||
|
|
||||||
Note that only python 2.x is supported.
|
|
||||||
|
|
||||||
## **Usage**
|
## **Usage**
|
||||||
|
|
||||||
To interract with a child process use `spawn` method:
|
To interract with a child process use `spawn` method:
|
||||||
|
|
||||||
child = pexpect.spawn('C:\Windows\System32\cmd.exe')
|
```python
|
||||||
child.expect('>')
|
import wexpect
|
||||||
child.sendline('ls')
|
child = wexpect.spawn('cmd.exe')
|
||||||
child.expect('>')
|
child.expect('>')
|
||||||
|
child.sendline('ls')
|
||||||
|
child.expect('>')
|
||||||
|
print(child.before)
|
||||||
|
```
|
||||||
|
|
||||||
For more information see [examples](./examples) folder.
|
For more information see [examples](./examples) folder.
|
||||||
|
|
||||||
@ -50,9 +56,7 @@ This repo tries to fix these limitations, with a few example code and pypi integ
|
|||||||
|
|
||||||
|
|
||||||
---
|
---
|
||||||
## Installation and limitation of wexpect
|
## Installation of wexpect
|
||||||
|
|
||||||
Current version does *not* work on python-3.x. You need to use **python 2.x** to use wexpect.
|
|
||||||
|
|
||||||
### Standard installation
|
### Standard installation
|
||||||
|
|
||||||
@ -69,3 +73,13 @@ One (non stanbdard) package, **pypiwin32** is needed by wexpect.
|
|||||||
|
|
||||||
pip install pypiwin32
|
pip install pypiwin32
|
||||||
|
|
||||||
|
|
||||||
|
---
|
||||||
|
## Dev
|
||||||
|
|
||||||
|
Thanks for any contributing!
|
||||||
|
|
||||||
|
To run test, enter into the folder of the wexpect's repo then:
|
||||||
|
|
||||||
|
`python -m pytest tests`
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user