标签: python debugging aptana
如何在Aptana python调试器中将输入文件传递给Python脚本? 从控制台我做了类似的事情:
python test.py< input.txt中
我尝试编辑调试配置以便将输入文件添加为 程序参数,但它不起作用。
答案 0 :(得分:1)
我不确定Aptana能否解决这个问题。如果没有,只需覆盖test.py中的sys.stdin:
sys.stdin
import sys sys.stdin = open('input.txt', 'r')