import win32com.client
shell = win32com.client.Dispatch("WScript.Shell")
shell.AppActivate("Command Prompt")
shell.SendKeys("%{ }") # This
#shell.SendKeys("% ") # and this
#shell.SendKeys("%( )") # and this is not working
WScript is not mandatory, you can propose any programmatic solution.