forked from M-Labs/artiq
frontend/client: fix screen clear on Windows
This commit is contained in:
parent
ac6e31d655
commit
e177bbd480
|
@ -5,6 +5,7 @@ import logging
|
||||||
import time
|
import time
|
||||||
import asyncio
|
import asyncio
|
||||||
import sys
|
import sys
|
||||||
|
import os
|
||||||
from operator import itemgetter
|
from operator import itemgetter
|
||||||
from dateutil.parser import parse as parse_date
|
from dateutil.parser import parse as parse_date
|
||||||
|
|
||||||
|
@ -17,7 +18,10 @@ from artiq.tools import short_format
|
||||||
|
|
||||||
|
|
||||||
def clear_screen():
|
def clear_screen():
|
||||||
sys.stdout.write("\x1b[2J\x1b[H")
|
if os.name == "nt":
|
||||||
|
os.system("cls")
|
||||||
|
else:
|
||||||
|
sys.stdout.write("\x1b[2J\x1b[H")
|
||||||
|
|
||||||
|
|
||||||
def get_argparser():
|
def get_argparser():
|
||||||
|
|
Loading…
Reference in New Issue