Running Python 3.4 on Windows platform.
I want to use ctypes to kick out an error msgbox when no input is put into an input field. code is:
if len(pet) == 0:
subprocess.call("Python help.py")
if pet == "cat":
try:
age = int(input("how old is your cat?"))
except ValueError:
print ("put in a number please")
Ctypes code is:
import ctypes
ctypes.windll.user32.MessageBoxW(0, "Enter data here please", "Input Error", 1)
My Ctypes msgbox opens perfectly but I end up with a python.exe window opening at the same time. This window closes whenthe msgbox is OK'ed but it looks poor show on screen. Question: How do I get the msgbox to open but not the python.exe window?