将输入文件传递给Aptana中的python调试器

时间:2014-03-15 12:33:23

标签: python debugging aptana

如何在Aptana python调试器中将输入文件传递给Python脚本? 从控制台我做了类似的事情:

  

python test.py< input.txt中

我尝试编辑调试配置以便将输入文件添加为 程序参数,但它不起作用。

enter image description here

1 个答案:

答案 0 :(得分:1)

我不确定Aptana能否解决这个问题。如果没有,只需覆盖test.py中的sys.stdin

import sys
sys.stdin = open('input.txt', 'r')