I am looking for way to exit the python shell without the Kill? popup
print ("Hello")
print ("Press any key to exit")
ex = raw_input ("")
exit
I am talking about the python shell for windows not the command prompt.
This is the popup I want to ignore and close the program after the user has hit any key.

Add parenthesis after the exit() to call the exit function. As it is now, it is not executing it as a function.
The following will exit the script without showing a command prompt, but you will still need to exit IDLE on your own.