Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Select an option

  • Save thatfunkymunki/0b20ab809ebdfb08770b0f88ce3478c1 to your computer and use it in GitHub Desktop.

Select an option

Save thatfunkymunki/0b20ab809ebdfb08770b0f88ce3478c1 to your computer and use it in GitHub Desktop.
mkdir -p /tmp/pypkgs
pip install --no-index --find-links=/tmp --target /tmp/pypkgs pyftdi
cat << 'EOF' > /tmp/run_term.py
import ctypes.util
import sys
import runpy
ctypes.util.find_library = lambda x: '/usr/lib/libusb-1.0.so'
sys.argv = ['pyterm.py', '-b', '115200', 'ftdi://ftdi:232:A9KX25LZ/1']
runpy.run_path('/tmp/pypkgs/bin/pyterm.py', run_name='__main__')
EOF
export PYTHONPATH=/tmp/pypkgs:$PYTHONPATH
python3 /tmp/run_term.py
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment