From 93067a3bcfdd8f1cb4afd1c8f7c4f960afb0831b Mon Sep 17 00:00:00 2001 From: mecaneer23 Date: Sun, 14 Apr 2024 11:29:05 -0500 Subject: [PATCH] feat: raise importerror to avoid running non-functional code --- src/acurses.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/acurses.py b/src/acurses.py index 994549e..9997fdd 100644 --- a/src/acurses.py +++ b/src/acurses.py @@ -1,7 +1,11 @@ """An ANSI interface that feels like programming with curses""" -# TODO: Windows support, see the following link -# https://github.com/python/cpython/blob/3.12/Lib/getpass.py +from os import name + +if name == "nt": + # TODO: Windows support, see the following link + # https://github.com/python/cpython/blob/3.12/Lib/getpass.py + raise ImportError("Windows isn't currently supported") # TODO: continue implementation with inspiration from following # https://www.lihaoyi.com/post/BuildyourownCommandLinewithANSIescapecodes.html