Unable to see os.environ['COLUMNS']

Thomas Bellman bellman at lysator.liu.se
Mon Sep 15 10:28:34 EDT 2008


Tim Chase <python.list at tim.thechases.com> writes:

>> $ export COLUMNS
>>
>> $ python -c "import os; print os.environ['COLUMNS']"
>> 80

> This works well, and also manages to keep up to date across runs
> as window-size changes.

Now try this:

    $ export COLUMNS
    $ python -c "import time, os; time.sleep(60); print os.environ['COLUMNS']"

and change the window width during that sleep.


-- 
Thomas Bellman,   Lysator Computer Club,   Linköping University,  Sweden
"Don't tell me I'm burning the candle at both ! bellman @ lysator.liu.se
 ends -- tell me where to get more wax!!"     ! Make Love -- Nicht Wahr!



More information about the Python-list mailing list