Skip to content

Commit 356de3e

Browse files
committed
Test realtime output
1 parent 105970c commit 356de3e

File tree

2 files changed

+18
-0
lines changed

2 files changed

+18
-0
lines changed

examples/test_data/realtime.py

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
from pyneuroml import pynml
2+
3+
4+
command = 'python snooze.py'
5+
run_dir = '.'
6+
7+
oo = pynml.execute_command_in_dir_with_realtime_output(command, run_dir, verbose=True)
8+
9+
print(oo)

examples/test_data/snooze.py

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
import time
2+
3+
print("zzz")
4+
time.sleep(1)
5+
print("hrnmm...")
6+
time.sleep(1)
7+
print("zzz")
8+
time.sleep(1)
9+
print("yawn...")

0 commit comments

Comments
 (0)