How do I redirect input and output with PyCharm like I would on the command line?

io-redirection, pycharm

Solution

(added in Pycharm 5)

In the `Edit Configurations` screen under `Logs` tab check the option: `Save console output to file` and provide a FULL PATH to the outputfile. thats it - works like a py-charm

Problem

With the command line if I am running a python file I can enter: ``` python filename.py < filename.in > filename.out ``` Is there a way to mimic this behavior in PyCharm?

Original source