Skip to content

Commit

Permalink
Merge pull request #67 from pkendall64/copy-streamexpect-into-the-cod…
Browse files Browse the repository at this point in the history
…ebase

Copy `streamexpect` to codebase to fix dependency upgrade issue
  • Loading branch information
JyeSmith committed May 12, 2022
2 parents 3c03159 + 2dc3cf9 commit 8761634
Show file tree
Hide file tree
Showing 3 changed files with 1,822 additions and 16 deletions.
17 changes: 1 addition & 16 deletions python/ETXinitPassthrough.py
Original file line number Diff line number Diff line change
@@ -1,27 +1,12 @@
import serial, time, sys
import subprocess
import argparse
import serials_find
import bootloader
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()
dbg_print("======== PASSTHROUGH INIT ========")
Expand Down
Loading

0 comments on commit 8761634

Please sign in to comment.