From 7ada4af31bff82bfd677c94c3690c70b5252e733 Mon Sep 17 00:00:00 2001 From: Daniel Pavel Date: Fri, 7 Dec 2012 14:29:30 +0200 Subject: [PATCH] hidconsole has to be run in unbuffered mode --- bin/hidconsole | 1 + lib/hidapi/hidconsole.py | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/bin/hidconsole b/bin/hidconsole index 9630a113..2acd0508 100755 --- a/bin/hidconsole +++ b/bin/hidconsole @@ -3,6 +3,7 @@ Z=`readlink -f "$0"` LIB=`readlink -f $(dirname "$Z")/../lib` export PYTHONPATH=$LIB +export PYTHONUNBUFFERED=yes PYTHON=${PYTHON:-`which python python2 python3 | head -n 1`} exec $PYTHON -m hidapi.hidconsole "$@" diff --git a/lib/hidapi/hidconsole.py b/lib/hidapi/hidconsole.py index c3d51e37..b93328a2 100644 --- a/lib/hidapi/hidconsole.py +++ b/lib/hidapi/hidconsole.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python -u import os import sys