Skip to content

Commit e177bbd

Browse files
committedFeb 21, 2016
frontend/client: fix screen clear on Windows
1 parent ac6e31d commit e177bbd

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed
 

Diff for: ‎artiq/frontend/artiq_client.py

+5-1
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
import time
66
import asyncio
77
import sys
8+
import os
89
from operator import itemgetter
910
from dateutil.parser import parse as parse_date
1011

@@ -17,7 +18,10 @@
1718

1819

1920
def clear_screen():
20-
sys.stdout.write("\x1b[2J\x1b[H")
21+
if os.name == "nt":
22+
os.system("cls")
23+
else:
24+
sys.stdout.write("\x1b[2J\x1b[H")
2125

2226

2327
def get_argparser():

0 commit comments

Comments
 (0)