When you use input() or raw_input() to get input in Python, Python gets the input from stdin.
When you use a print statement in Python, Python sends the output to stdout.
Under normal circumstances, stdin and stdout come from and go to the terminal console where the Python interpreter is running.
For example, when you run the Python script hello.py as follows
$ python hello.py > output.txt
the operating system redirects the standard output from Python to the file output.txt.
When you run the Python script input.py as follows (with test.txt)
$ python input.py < test.txt
the operating system redirects the file test.txt into the standard input of Python.
For example
$ python hello.py | python input.py
takes the standard output from the hello.py script and feeds in into the input.py script. Here, the operating system is running two separate processes for two instances of the Python interpreter, one sending its output to the other.
This ability to use standard output as input to another program is what makes QuickDraw so easy to use for new programmers.
Download quickdraw.jar from the QuickDraw site and run it as follows.
java -jar quickdraw.jar
Here are some example commands that you can try
circle 100 100 50
rect 300 300 200 150
color 255 0 0
rect 300 200 300 150
quit
Observe what these do, then check the QuickDraw documentation to see the extensive set of commands available.
$ python qd1.py
You should see a set of QuickDraw commands printed to standard output. You can feed these commands to QuickDraw with the following.
$ python qd1.py | java -jar quickdraw.jar
You should now see a circle and two rectangles displayed on the output. Python will stop executing but QuickDraw will continue, waiting for input that will never arrive. Terminate QuickDraw by closing its window, or with a Ctrl-C from the console.