Why doesn#39;t command redirection operator work in PyCharm?(为什么命令重定向运算符在 PyCharm 中不起作用?)
问题描述
我想在 PyCharm 中运行一个 python 脚本并将输出的标准输入重定向到一个文件.因此,我打开了运行/调试配置并输入:
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:
错误:无法识别的参数:>> output.txt
error: unrecognized arguments: >> output.txt
你知道如何在 PyCharm 环境中使用重定向操作符吗?
Do you know how to use redirection operator in PyCharm environment?
推荐答案
它在 Run -->EditConfigurations 中可用.
It is available in Run -->EditConfigurations.
在右侧,您将看到日志选项卡,其中显示将控制台输出保存到文件.
On the right side you will have Logs tab which says Save console output to file.
您可以使用该选项.
这篇关于为什么命令重定向运算符在 PyCharm 中不起作用?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!
本文标题为:为什么命令重定向运算符在 PyCharm 中不起作用?


基础教程推荐
- 求两个直方图的卷积 2022-01-01
- 使用大型矩阵时禁止 Pycharm 输出中的自动换行符 2022-01-01
- 修改列表中的数据帧不起作用 2022-01-01
- 在同一图形上绘制Bokeh的烛台和音量条 2022-01-01
- PermissionError: pip 从 8.1.1 升级到 8.1.2 2022-01-01
- 包装空间模型 2022-01-01
- 无法导入 Pytorch [WinError 126] 找不到指定的模块 2022-01-01
- Plotly:如何设置绘图图形的样式,使其不显示缺失日期的间隙? 2022-01-01
- 在Python中从Azure BLOB存储中读取文件 2022-01-01
- PANDA VALUE_COUNTS包含GROUP BY之前的所有值 2022-01-01