0

hi
i want to redirect python compiler messages to a file.
for example

if i run a python which has a line

a=;2

python compiler will give me an error message saying 'syntax error'
how i can fetch this error and write it to a file?

i run it with

./test.py > log.txt

but it will output the error in console.

regards

2
Contributors
3
Replies
5
Views
7 Years
Discussion Span
Last Post by Gribouillis
0

WoW, thanks alot Gribouillis :D
i greatly appreciated.
but can you please tell me the difference between mine and yours?
what the "2" is doing here?

regards

This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.