【发布时间】:2011-04-13 11:01:34
【问题描述】:
我有一个使用 python 作为脚本语言的应用程序。当有人修改 python 脚本时,我想知道它是否有语法错误。我正在使用 python.exe(windows 2003,python 2.5)来检查脚本,所以我执行类似
python script.py > errors.txt
尽管script.py有语法错误,但是errors.txt仍然是0kb,在这种情况下,python检测到的错误会显示在屏幕上(但不会重定向到文件)
【问题讨论】:
-
python -ud script.py > errors.txt
标签: redirect syntax-error python