From: Oti <oh...@gm...> - 2007-06-01 21:49:57
|
To redirect both stdout and stderr, use: any_command > errors.txt 2>&1 best wishes, Oti. On 5/28/07, Utkarsh Upadhyay <mus...@gm...> wrote: > Hi, > > There's a fairly simple way to do it, it seems: > > testfile.py > ============================ > for i in range(999): > try: > print int(str(i)+"causes an exception") > except ValueError, error: > print 'Got an error ', error > ============================= > > C:\>jython testfile.py > errors.txt > > That saves all errors/output into the erros.txt file. > However, this does NOT work quite right: > > c:\>jython -Dpython.verbose=debug testfile.py > errors.txt > > As it will still output the jython debug reports to the command prompt. |