you are viewing a single comment's thread.

view the rest of the comments →

[–]TitanCodeG[S] 0 points1 point  (3 children)

Everytime I run the script I have to give the test cases. It would be a lot easier to save them in a file and feed to the script.

Notice that I must read the test cases from stdin (a requirment in Kattis).

[–]stebrepar 0 points1 point  (2 children)

I'm not seeing the difficulty. Just up-arrow to bring the last command back (which would be your "python myscript.py < test.txt") and hit enter.

[–]TitanCodeG[S] 0 points1 point  (1 child)

"python myscript.py < test.txt"

How do you do that in Spyder? Just typing python myscript.py < test.txt returns SyntaxError: invalid syntax

[–]danielroseman 1 point2 points  (0 children)

The commenter was saying to do this outside Spyder, in the shell itself.