I'd like to use Pythonista for coding competitions (practice). On my Windows box, I typically create one file for the solution and multiple files for each test case. Running the solution with a test case looks something like this:
python solution.py < input1
or
cat input1 | python solution.py
Any suggestion for how to achieve this in Pythonista? Ideally I don't want to open a file from within solution.py, but if there is no other solution I'll create some boilerplate code at the beginning of my solutions. I'd like to be able to copy/paste the solution (under the boilerplate if necessary) into the judgeing application. Thus, I would not need to change the following line before submitting for judement:
n,m = map(int, raw_input().split())
for input:
8 3
thanks!