From ebe835c23b19fe51abb0c143ecee5d74fae3ebd3 Mon Sep 17 00:00:00 2001 From: themixray <35273590+themixray@users.noreply.github.com> Date: Thu, 4 Nov 2021 17:06:42 +0300 Subject: [PATCH] Add files via upload --- pygwin/__init__.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/pygwin/__init__.py b/pygwin/__init__.py index 76d93f4..265fe21 100644 --- a/pygwin/__init__.py +++ b/pygwin/__init__.py @@ -15,10 +15,12 @@ try: except ModuleNotFoundError as e: import pip,os,sys if 'imofpgw' in sys.argv: + os.system('cls' if os.name in ('nt', 'dos') else 'clear') raise e def install(package): if hasattr(pip,'main'):pip.main(['install',package]) else:pip._internal.main(['install',package]) + os.system('cls' if os.name in ('nt', 'dos') else 'clear') modules = ['datetime', 'tempfile', 'pywin32', @@ -29,4 +31,4 @@ except ModuleNotFoundError as e: 'ctypes'] for i in modules: install(i) - os.execv(sys.argv[0], sys.argv+['imofpgw']) + os.execv(sys.executable, ['python']+sys.argv+['imofpgw'])