> Hi All, > > Can someone tell me how to redirect stderr back to the console once > you've moved it? > > import os,sys > se = os.open("/tmp/mod.log", os.O_WRONLY|os.O_APPEND|os.O_CREAT) > sys.stderr.write("Foobar\n") > Foobar > os.dup2(se, 2)
why not os.dup2(2, 10) and then later os.dup2(10, 2) -- дамјан ( http://softver.org.mk/damjan/ ) Begin...the rest is easy. -- http://mail.python.org/mailman/listinfo/python-list