Double-clicking a .py file runs the program in a "DOS box"/CMD window. Then the window closes when program ends. Could put a input("Hit enter to exit") at end of program to pause it before terminating. But maybe better not to. Text I/O programs can be run in the Windows Command Prompt (CMD, "DOS box") or Linux/Mac Terminal shell. Start CMD: menu: Windows System | Command Prompt Windows key + R cmd Installation of Python added it to Path (list of folders to search for commands) C:\Users\xyz\Documents> path > cd to your Python programs folder > welcome.py > python welcome.py > python Python shell. Cannot do file operations. Run a program file within Python shell (and IDLE): >>> exec(open("welcome.py").read()) Output print'ing is much faster in CMD and Python shell than in IDLE Shell. input() takes its input from STDIN print() sends its output to STDOUT By default these are connected to the "terminal", i.e. the keyboard and screen but can be redirected to come from a file and to go to a file by the operating system. File redirection, a service of the OS: here, redirect input to come a file: loop_EOF.py echo ^G >>> print('\a') Python shell, not IDLE? a=alert