From be5fa58a0e49d33f88054fbb5a9381e02ae74804 Mon Sep 17 00:00:00 2001 From: Benedek Racz Date: Sun, 5 May 2019 17:54:10 +0200 Subject: [PATCH] [UDT] update README to python-3 --- README.md | 34 ++++++++++++++++++++++++---------- 1 file changed, 24 insertions(+), 10 deletions(-) diff --git a/README.md b/README.md index b0d8410..8a805dc 100644 --- a/README.md +++ b/README.md @@ -5,20 +5,26 @@ *Pexpect* is a Python module for spawning child applications and controlling them automatically. +**!! UPDATE !!** + +I'm glad to announce that python-3 is supported form version 2.3.3 + ## **Install** pip install wexpect -Note that only python 2.x is supported. - ## **Usage** To interract with a child process use `spawn` method: - child = pexpect.spawn('C:\Windows\System32\cmd.exe') - child.expect('>') - child.sendline('ls') - child.expect('>') +```python +import wexpect +child = wexpect.spawn('cmd.exe') +child.expect('>') +child.sendline('ls') +child.expect('>') +print(child.before) +``` 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 - -Current version does *not* work on python-3.x. You need to use **python 2.x** to use wexpect. +## Installation of wexpect ### Standard installation @@ -68,4 +72,14 @@ good enough instead of installing. However in this case you need to install manu One (non stanbdard) package, **pypiwin32** is needed by wexpect. pip install pypiwin32 - \ No newline at end of file + + +--- +## Dev + +Thanks for any contributing! + +To run test, enter into the folder of the wexpect's repo then: + +`python -m pytest tests` +