[PATCH] Detect console width on Windows
Patrick Mézard
pmezard at gmail.com
Mon Apr 26 16:12:36 CDT 2010
Le 25/04/10 08:59, anatoly techtonik a écrit :
> Hello. I've added support for detection of console width on Windows.
> It moves one piece of POSIX code, and this move is untested unlike
> Windows part. The patch uses pywin32, and is based on the ctypes code
> from http://bitbucket.org/techtonik/python-pager/src/tip/pager.py that
> I would like to propose for inclusion in Python stdlib one day as
> console module.
>
> In this particular patch the one thing the bugs me is the POSIX part
> with detection of width of stderr first, then stdout and stdin
> finally. I do not see the reason behind this order and presence of
> stdin at all. How does it behave with redirected output? Anyway, I've
> just moved that part to posix.py without touching it.
>
> Please, CC.
>
>
> # HG changeset patch
> # Parent 33119d0252c1aa46da82a22aeb067fcd172ce804
> # User anatoly techtonik <techtonik at gmail.com>
> Detect console width also on Windows
I refactored termwidth() on windows then pushed a different version including the annotations in my other responses:
http://hg.intevation.org/mercurial/crew/rev/81631f0cf13b
Thanks for working on this!
--
Patrick Mézard
More information about the Mercurial-devel
mailing list