Skip to content

Commit

Permalink
Fix streamexpect install dependency issue by included streamexpect in…
Browse files Browse the repository at this point in the history
… our codebase (#1564)
  • Loading branch information
pkendall64 committed May 11, 2022
1 parent d9af2e8 commit 520d172
Show file tree
Hide file tree
Showing 3 changed files with 1,823 additions and 14 deletions.
16 changes: 2 additions & 14 deletions src/python/ETXinitPassthrough.py
Original file line number Diff line number Diff line change
@@ -1,25 +1,13 @@
import serial, time, sys
import subprocess
import argparse
import serials_find
import external.streamexpect as streamexpect


def dbg_print(line=''):
sys.stdout.write(line + '\n')
sys.stdout.flush()

try:
import streamexpect
except ImportError:
sys.stdout.write("Installing pexpect")
subprocess.check_call([sys.executable, "-m", "pip", "install", "streamexpect"])
try:
import streamexpect
except ImportError:
env.Execute("$PYTHONEXE -m pip install streamexpect")
try:
import streamexpect
except ImportError:
streamexpect = None

def etx_passthrough_init(port, requestedBaudrate):
sys.stdout.flush()
Expand Down

0 comments on commit 520d172

Please sign in to comment.