Python: Drop old copy of pexpect library

Make room for a fresh import.

Change-Id: I9653d49960b298e663d41baca72b5605f659f16e
Add Python/Pexpect directory placeholder

Create .gitattributes to tell Git checks to ignore whitespace in
third-party code.

Change-Id: I84ef400256c63f1bb89f827f085d8cc688dbc6e0
Pexpect 2.3-r507 (reduced)

Extract upstream Pexpect using the following shell code.

url=https://pexpect.svn.sourceforge.net/svnroot/pexpect/trunk/pexpect &&
v=2.3 &&
r=507 &&
date=$(svn log -q -c$r $url |
       sed -n "/^r/ {s/[^|]*|[^|]*|//;p;}") &&
svn export -r$r $url pexpect-$v-r$r &&
mkdir -p Python/Pexpect &&
mv pexpect-$v-r$r/pexpect.py Python/Pexpect &&
rm -rf pexpect-$v-r$r &&
echo "r$r date: $date"

Change-Id: I89fa9c70bfd2f72d2442db6e4389caf2d29b9eb1
Pexpect 2.6-r533 (reduced)

Extract upstream Pexpect using the following shell code.

url=https://pexpect.svn.sourceforge.net/svnroot/pexpect/trunk/pexpect &&
v=2.6 &&
r=533 &&
date=$(svn log -q -c$r $url |
       sed -n "/^r/ {s/[^|]*|[^|]*|//;p;}") &&
svn export -r$r $url pexpect-$v-r$r &&
mkdir -p Python/Pexpect &&
mv pexpect-$v-r$r/pexpect.py Python/Pexpect &&
rm -rf pexpect-$v-r$r &&
echo "r$r date: $date"

Change-Id: I0ab5f95efc984654903fa903478580b4d94a2148
WinPexpect 0.8-r7795e8d5d3a8 (reduced)

Extract upstream WinPexpect using the following shell code.

url=https://bitbucket.org/geertj/winpexpect &&
r=7795e8d5d3a8 &&
hg clone -u $r $url winpexpect-$r &&
mkdir -p Python/Pexpect &&
mv winpexpect-$r/lib/winpexpect.py \
   winpexpect-$r/lib/pexpect.py \
   winpexpect-$r/AUTHORS \
   winpexpect-$r/LICENSE \
   Python/Pexpect &&
(cd winpexpect-$r && hg log -r $r |grep "^date:") &&
rm -rf winpexpect-$r

Change-Id: Id6a48047c7298e2d239563329d234d3ebd7992d6
WinPexpect 1.5-r76df3cfcb143 (reduced)

Extract upstream WinPexpect using the following shell code.

url=https://bitbucket.org/geertj/winpexpect &&
r=76df3cfcb143 &&
hg clone -u $r $url winpexpect-$r &&
mkdir -p Python/Pexpect &&
mv winpexpect-$r/lib/winpexpect.py \
   winpexpect-$r/lib/pexpect.py \
   winpexpect-$r/AUTHORS \
   winpexpect-$r/LICENSE \
   Python/Pexpect &&
(cd winpexpect-$r && hg log -r $r |grep "^date:") &&
rm -rf winpexpect-$r

Change-Id: I5ecdf40f0f92dd9a501b9027748755c238767da1
WinPexpect 1.5-7-r74fa12e233f4 (reduced)

Extract Kelvin You's WinPexpect using the following shell code.

url=https://bitbucket.org/weyou/winpexpect &&
r=74fa12e233f4 &&
hg clone -u $r $url winpexpect-$r &&
mkdir -p Python/Pexpect &&
mv winpexpect-$r/lib/winpexpect.py \
   winpexpect-$r/lib/pexpect.py \
   winpexpect-$r/AUTHORS \
   winpexpect-$r/LICENSE \
   Python/Pexpect &&
(cd winpexpect-$r && hg log -r $r |grep "^date:") &&
rm -rf winpexpect-$r

Change-Id: Idf32437c63867e18ad9de1461f73a0224cdca5ee
Python/Pexpect: Use upstream output encoding approach

WinPexpect ported its Pexpect to Python 3 by using s.encode('ascii')
while upstream Pexpect did the same using s.encode("utf-8").  Use the
latter so we can merge with upstream changes cleanly.

Change-Id: Iae8da9e631b0cba0546572e7ff3ff5c8f608116a
Merge branch 'import-WinPexpect' into import-Pexpect

Resolve sendline conflict in Python/Pexpect/pexpect.py using the cleaner
winpexpect side.

Change-Id: Ia78c3b9902ac7267171899677bb25e14e8c9c042
Python/Pexpect: Skip modules not available on Windows

WinPexpect commented out some non-Windows modules used by Pexpect.
Teach Pexpect to run on non-Windows platforms while still supporting
WinPexpect by loading the modules conditionally.

Change-Id: I12ce960fb97f736a69b7f20e173345cfc0ca3077
Python/Pexpect: Fix winpexpect stub when not in default sys.path

WinPexpect uses a stub process to launch the child process with a clean
set of handles but needs to "import winpexpect" in the stub.  Teach the
stub to put the winpexpect location in sys.path before importing it in
case it is not there by default.

Change-Id: I6c770185f8bef9d3d4b695139ee710f6592c2f1c
Use Python/Pexpect from OSEHRAHelper and VistATestClient

Python/Pexpect now has both Pexpect and a WinPexpect sharing it.
Teach both OSEHRA modules that need Pexpect to use the modules
from this location if they are not installed on the system.
Remove Pexpect and WinPexpect from "Scripts/HowtoSetupEnv.rst"
since they are now provided automatically.

Change-Id: I937419e042ba3605153a95b5f243eea0f95d766d
Merge branch 'import-Pexpect'

5d754e41 Use Python/Pexpect from OSEHRAHelper and VistATestClient
00b67724 Python/Pexpect: Fix winpexpect stub when not in default sys.path
27cbfb7b Python/Pexpect: Skip modules not available on Windows
e3600b84 Merge branch 'import-WinPexpect' into import-Pexpect
87485252 Python/Pexpect: Use upstream output encoding approach
639ef5d1 WinPexpect 1.5-7-r74fa12e233f4 (reduced)
fd9b75d3 WinPexpect 1.5-r76df3cfcb143 (reduced)
f5b8998c WinPexpect 0.8-r7795e8d5d3a8 (reduced)
8f65fe30 Pexpect 2.6-r533 (reduced)
b7b7d840 Pexpect 2.3-r507 (reduced)
c3f1457d Add Python/Pexpect directory placeholder
e5a8b440 Python: Drop old copy of pexpect library

Change-Id: I0a712d0120b593d306150ab3626299bd66451540