问题
I want to run a python script in PyCharm and redirect the stdin out put to a file. Therefore, I opened Run/Debug configurations and typed:
>> output.txt
in script parameters field. When I run the script, I get the error:
error: unrecognized arguments: >> output.txt
Do you know how to use redirection operator in PyCharm environment?
回答1:
It is available in Run -->EditConfigurations.
On the right side you will have Logs tab which says Save console output to file.
You may use that option.
来源:https://stackoverflow.com/questions/37659916/why-doesnt-command-redirection-operator-work-in-pycharm