random thought of the day - a progress bar for tree transforms ?
Robey Pointer
robey at lag.net
Wed Feb 15 18:43:41 GMT 2006
On 14 Feb 2006, at 17:16, John A Meinel wrote:
> Robey Pointer wrote:
>>
>> This makes progress bar width-detection work again on posix (it was
>> always dropping to the default of 80 columns on my ibook) and renames
>> the "copy_to" bar to "copy" ("copy_to" is inscrutable to users,
>> including me).
>
> Should we use os.environ['COLUMNS'] preferentially to using your very
> odd construct?
>
> It seems like your method should override COLUMNS (thus come first).
> Since it seems like it would be more guaranteed to be correct if we
> can
> get it.
I wasn't sure what the intent of $COLUMNS was in the source. If the
user has a very specific column size in mind and sets that manually,
I guess we should use it in preference to any auto-detection. OTOH,
when I was trying to get it working, I noticed that $COLUMNS is set
when you're in an interactive shell, but *not* from within a script,
so it may just be that the original coder thought/hoped that $COLUMNS
was a universal thing.
robey
PS. Don't blame me about the "very odd construct"! It comes straight
from the bowels of unix arcana. ;) There ought to be a more pythonly
way, but I couldn't find it.
More information about the bazaar
mailing list