diff options
| author | Kevin Van Brunt <kmvanbrunt@gmail.com> | 2018-03-21 01:03:24 -0400 |
|---|---|---|
| committer | Kevin Van Brunt <kmvanbrunt@gmail.com> | 2018-03-21 01:03:24 -0400 |
| commit | 57e53eed70f3a317d95a0f446eaa60c24392a388 (patch) | |
| tree | c20009ccfdbd1fba0619e20e26b084cec8dfc376 /cmd2.py | |
| parent | f4570b6a3c13304f12e4319b4bf97dbe4f64305d (diff) | |
| download | cmd2-git-57e53eed70f3a317d95a0f446eaa60c24392a388.tar.gz | |
shutil.get_terminal_size does not exist before Python 3.3
Diffstat (limited to 'cmd2.py')
| -rwxr-xr-x | cmd2.py | 5 |
1 files changed, 4 insertions, 1 deletions
@@ -1557,7 +1557,10 @@ class Cmd(cmd.Cmd): matches.sort() self.poutput("\n") - num_cols = shutil.get_terminal_size().columns + if sys.version_info >= (3, 3): + num_cols = shutil.get_terminal_size().columns + else: + num_cols = 80 if matches_to_display is None: self.columnize(matches, num_cols) |
