Q:

How to enter multiple input data using an online compiler such as ideone, codepad and compileonline?

I would like to test programs online, as the place where I work does not have a python compiler. There are many online sites such as ideone, codepad and complieonline. However, I have noticed that codepad does not accept input data and although ideone input data, it only accepts one entry data at a time. For example I wanted to test this program on complileonline 
PREFIX = 'Simon says '

line = raw_input('Enter: ')
while line:
    if line.startswith(PREFIX):
        print line[len(PREFIX):]
    line = raw_input('Enter: ')

I entered my input and separated them by pipeline (as stated on the website instructions) but kept getting this error message
Executing the code....
$python /tmp/135731949523855.py 
Enter: Enter: Enter: Traceback (most recent call last):
File "/tmp/135731949523855.py", line 9, in ?
line = raw_input('Enter: ')
EOFError: EOF when reading a line

How can I enter multiple entries to test my program? How can I enter multiple entries onto these online websites, otherwise is there another, example testing with my code without the requirement of user input.

A:

Well, consider to use hard-coded inputs inside your code (turn the "raw_input" function into something you except to get from the user). It can be great solution.
One of the options you have which is pretty close to raw_input, is to use sys.argv:
import sys
print sys.argv[1]

Compileonline provides you the option, below of your code, to add command line arguments.
However, on PythonAnywhere.com your code seems to run just fine :) You might want to try it there.
Good luck:)

