2017-11-12 03:36:50 +00:00
|
|
|
Console
|
|
|
|
-------
|
|
|
|
|
2017-12-30 15:14:32 +00:00
|
|
|
.. py:function:: pydu.console.console_size(fallback=(80, 25))
|
2017-11-12 03:36:50 +00:00
|
|
|
|
2017-12-30 15:14:32 +00:00
|
|
|
For Windows, return (width, height) of available window area, fallback
|
2017-11-12 03:36:50 +00:00
|
|
|
if no console is allocated.
|
2017-12-30 15:14:32 +00:00
|
|
|
For POSIX system, return (width, height) of console terminal, fallback
|
2017-11-12 03:36:50 +00:00
|
|
|
on IOError, i.e. when no console is allocated.
|
2017-12-30 15:14:32 +00:00
|
|
|
For other system, return fallback.
|
|
|
|
Fallback defaults to (80, 25) which is the default size used by many
|
|
|
|
terminal emulators.
|
2017-11-12 03:36:50 +00:00
|
|
|
|
|
|
|
>>> from pydu.console import console_size
|
|
|
|
>>> console_size()
|
|
|
|
(80, 25)
|