diff --git a/tox.ini b/tox.ini
index c5a1ce1bff9934563a9ffec0573d8a66b2c91cc5..5cf16ceec4f3b547445e3f2b8b4ea4884f64a0ca 100644
--- a/tox.ini
+++ b/tox.ini
@@ -79,7 +79,7 @@ commands =
     sh -c 'echo DISPLAY=$DISPLAY'
     sh -c 'echo XAUTHORITY=$XAUTHORITY'
 ; pipe echo into python since some examples expect input to close the window after the example is run
-    sh -c 'ls examples/*.py | xargs -I{} -n 1 sh -c "echo -e \"\n====== Running {} ========\n\"; echo | python {}"'
+    sh -c 'ls examples/*.py | xargs -I{} -n 1 sh -c "echo -e \"\n====== Running {} ========\n\"; echo "q\n" | python {}"'
 
 [testenv:notebooks]
 basepython = python