If you type
in a terminal, you are greeted by the python prompt
and python waits for you to type in commands. This is called the direct mode.
Note that idle opens with the direct mode but has the option (using the menu commands: File → new window) to work as an program editor.
To try out the python direct mode via an experimental Web interface, see: http://www.skulpt.org/