If it is stdout that you are examining through stty, then shouldn't the command be:
"stty -a -F /dev/stdout" Although, that's semantics I guess - I'd be interested to see if anyone could get the columns field to be different between stdin and stdout on a terminal. :) cheers Nick On 25/10/2007, Dustin J. Mitchell <[EMAIL PROTECTED]> wrote: > > On 10/24/07, Giovanni Bajo <[EMAIL PROTECTED]> wrote: > > sys.stdin.isatty() is clearer IMO. All in all, maybe only try/except is > > sufficient though... > > Well, first, stdin isn't what we want -- stdout is. Second, > sys.stdout is not necessarily fd 1, which is what stty will look at. > Third, svnmerge_test.py replaces stdout with a cStringIO object, which > doesn't have an isatty method. > > As for just using try/except: os.popen doesn't trap stderr, so ideally > we'll avoid running stty in cases where we know it will fail, to avoid > dumping spurious messages to the user's terminal. > > > os.putenv() changes also the environment for the whole svnmerge process > > (it would be better to modify it only for the child process, but that > > can be done only with subprocess.py). Is that really required? Don't we > > do already the same for controlling the output of "svn" itself? > > Yes, sorry. I'll remove that. > > Dustin > > -- > Storage Software Engineer > http://www.zmanda.com > > _______________________________________________ > Svnmerge mailing list > [email protected] > http://www.orcaware.com/mailman/listinfo/svnmerge > > >
_______________________________________________ Svnmerge mailing list [email protected] http://www.orcaware.com/mailman/listinfo/svnmerge
