aboutsummaryrefslogtreecommitdiffstats
path: root/vt100
diff options
context:
space:
mode:
authorJesse Luehrs <doy@tozt.net>2014-10-22 11:41:30 -0400
committerJesse Luehrs <doy@tozt.net>2014-10-22 11:41:30 -0400
commit26305a754b0c6e9edc9ed620e58e8507a95d8dec (patch)
treeaac01ceef992e5d0cc9752eb07b78b109dbdcea4 /vt100
parent4afd275b89be802582e1b4dd665411e18f30336d (diff)
downloadlibvt100-python-26305a754b0c6e9edc9ed620e58e8507a95d8dec.tar.gz
libvt100-python-26305a754b0c6e9edc9ed620e58e8507a95d8dec.zip
default this to the whole screen
Diffstat (limited to 'vt100')
-rw-r--r--vt100/__init__.py12
1 files changed, 10 insertions, 2 deletions
diff --git a/vt100/__init__.py b/vt100/__init__.py
index 5948696..422c296 100644
--- a/vt100/__init__.py
+++ b/vt100/__init__.py
@@ -169,7 +169,11 @@ class vt100(object):
def process(self, string):
return vt100_raw.process_string(addressof(self._screen), string)
- def window_contents(self, row_start, col_start, row_end, col_end):
+ def window_contents(self, row_start=0, col_start=0, row_end=None, col_end=None):
+ if row_end is None:
+ row_end = self._rows - 1
+ if col_end is None:
+ col_end = self._cols - 1
row_start = min(max(row_start, 0), self._rows - 1)
col_start = min(max(col_start, 0), self._cols - 1)
row_end = min(max(row_end, 0), self._rows - 1)
@@ -178,7 +182,11 @@ class vt100(object):
addressof(self._screen), row_start, col_start, row_end, col_end
).decode('utf-8')
- def window_contents_formatted(self, row_start, col_start, row_end, col_end):
+ def window_contents_formatted(self, row_start=0, col_start=0, row_end=None, col_end=None):
+ if row_end is None:
+ row_end = self._rows - 1
+ if col_end is None:
+ col_end = self._cols - 1
row_start = min(max(row_start, 0), self._rows - 1)
col_start = min(max(col_start, 0), self._cols - 1)
row_end = min(max(row_end, 0), self._rows - 1)