From d26c8008d2a52f54426a1bdd965cfac037dfd482 Mon Sep 17 00:00:00 2001 From: Matthias Geier Date: Sat, 4 Feb 2017 13:31:52 +0100 Subject: Simplify plot_input example --- examples/plot_input.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'examples') diff --git a/examples/plot_input.py b/examples/plot_input.py index 5a105f4..88eb99f 100755 --- a/examples/plot_input.py +++ b/examples/plot_input.py @@ -63,16 +63,14 @@ def update_plot(frame): """ global plotdata - block = True # The first read from the queue is blocking ... while True: try: - data = q.get(block=block) + data = q.get_nowait() except queue.Empty: break shift = len(data) plotdata = np.roll(plotdata, -shift, axis=0) plotdata[-shift:, :] = data - block = False # ... all further reads are non-blocking for column, line in enumerate(lines): line.set_ydata(plotdata[:, column]) return lines -- cgit v1.2.3