summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIan Ward <ian@excess.org>2014-02-21 11:45:54 -0500
committerIan Ward <ian@excess.org>2014-02-21 11:45:54 -0500
commit28cbfcc56f8018c35457a19e409fd1cc91221f97 (patch)
treea4f77a1419b41596c38217660715a5a79ace8acc
parenta3263e13f10673463cd5e0ae620f733ee4ae6ddb (diff)
parentfc9fc20f659804aea5ccd39c331c06ff6f96c255 (diff)
downloadurwid-28cbfcc56f8018c35457a19e409fd1cc91221f97.tar.gz
Merge pull request #55 from ivanov/fix-typos
Fix a bunch of typos
-rw-r--r--docs/manual/displaymodules.rst2
-rwxr-xr-xexamples/calc.py2
-rwxr-xr-xexamples/dialog.py2
-rwxr-xr-xexamples/fib.py2
-rwxr-xr-xexamples/lcd_cf635.py4
-rwxr-xr-xexamples/tour.py2
-rw-r--r--examples/twisted_serve_ssh.py4
-rw-r--r--urwid/canvas.py2
-rwxr-xr-xurwid/container.py6
-rwxr-xr-xurwid/decoration.py6
-rwxr-xr-xurwid/graphics.py2
-rw-r--r--urwid/listbox.py2
-rwxr-xr-xurwid/main_loop.py2
-rwxr-xr-xurwid/old_str_util.py2
-rw-r--r--urwid/raw_display.py6
-rwxr-xr-xurwid/split_repr.py2
-rw-r--r--urwid/text_layout.py6
-rw-r--r--urwid/treetools.py2
-rw-r--r--urwid/util.py2
19 files changed, 29 insertions, 29 deletions
diff --git a/docs/manual/displaymodules.rst b/docs/manual/displaymodules.rst
index c31d417..eba84c8 100644
--- a/docs/manual/displaymodules.rst
+++ b/docs/manual/displaymodules.rst
@@ -92,7 +92,7 @@ Screenshot Display Module ``html_fragment``
Screenshots of Urwid interfaces can be rendered in plain HTML. The
:class:`html_fragment.HtmlGenerator` display module lets you do this by simulating user input
and capturing the screen as fragments of HTML each time
-:meth:`html_fragemnt.HtmlGenerator.draw_screen` is
+:meth:`html_fragment.HtmlGenerator.draw_screen` is
called.
These fragments may be included in HTML documents. They will be rendered
diff --git a/examples/calc.py b/examples/calc.py
index a40259f..f132172 100755
--- a/examples/calc.py
+++ b/examples/calc.py
@@ -734,7 +734,7 @@ class CalcDisplay:
# keep only the non-children
self.col_list[i:] = keep_right_cols
- # fix the letter assigmnents
+ # fix the letter assignments
for j in range(i, len(self.col_list)):
col = self.col_list[j]
# fix the column heading
diff --git a/examples/dialog.py b/examples/dialog.py
index 7de86d5..2de61c0 100755
--- a/examples/dialog.py
+++ b/examples/dialog.py
@@ -206,7 +206,7 @@ class ListDialogDisplay(DialogDisplay):
class CheckListDialogDisplay(ListDialogDisplay):
def on_exit(self, exitcode):
"""
- Mimick dialog(1)'s --checklist exit.
+ Mimic dialog(1)'s --checklist exit.
Put each checked item in double quotes with a trailing space.
"""
if exitcode != 0:
diff --git a/examples/fib.py b/examples/fib.py
index 4439129..7f8d4b7 100755
--- a/examples/fib.py
+++ b/examples/fib.py
@@ -32,7 +32,7 @@ import urwid
class FibonacciWalker(urwid.ListWalker):
"""ListWalker-compatible class for browsing fibonacci set.
- positions returned are (value at position-1, value at poistion) tuples.
+ positions returned are (value at position-1, value at position) tuples.
"""
def __init__(self):
self.focus = (0L,1L)
diff --git a/examples/lcd_cf635.py b/examples/lcd_cf635.py
index e01ead2..77e8f17 100755
--- a/examples/lcd_cf635.py
+++ b/examples/lcd_cf635.py
@@ -104,7 +104,7 @@ class LCDProgressBar(urwid.FlowWidget):
Update and return the value one step +ve or -ve, based on
the size of the displayed bar.
- directon -- 1 for +ve, 0 for -ve
+ direction -- 1 for +ve, 0 for -ve
"""
steps = self.get_steps(size)
filled = urwid.int_scale(self.value, self.range, steps)
@@ -249,7 +249,7 @@ def build_menus():
urwid.Text("This is a demo of Urwid's CF635Display "
"module. If you need an interface for a limited "
"character display device this should serve as a "
- "good example for implmenting your own display "
+ "good example for implementing your own display "
"module and menu-driven application."),
])
]
diff --git a/examples/tour.py b/examples/tour.py
index d0a9a48..fedfb59 100755
--- a/examples/tour.py
+++ b/examples/tour.py
@@ -122,7 +122,7 @@ def main():
text_cb_list = [u"Wax", u"Wash", u"Buff", u"Clear Coat", u"Dry",
u"Racing Stripe"]
text_rb_list = [u"Morning", u"Afternoon", u"Evening", u"Weekend"]
- text_listbox = [u"All these widgets have been diplayed "
+ text_listbox = [u"All these widgets have been displayed "
u"with the help of a ", ('important', u"ListBox"), u" widget. "
u"ListBox widgets handle scrolling and changing focus. A ",
('important', u"Frame"), u" widget is used to keep the "
diff --git a/examples/twisted_serve_ssh.py b/examples/twisted_serve_ssh.py
index 64dcdc7..36396dd 100644
--- a/examples/twisted_serve_ssh.py
+++ b/examples/twisted_serve_ssh.py
@@ -168,7 +168,7 @@ class TwistedScreen(urwid.BaseScreen):
1. Input
2. Output
- Input is achieved in normal urwid by passing a lsit of available readable
+ Input is achieved in normal urwid by passing a list of available readable
file descriptors to the event loop for polling/selecting etc. In the
Twisted situation, this is not necessary because Twisted polls the input
descriptors itself. Urwid allows this by being driven using the main loop
@@ -265,7 +265,7 @@ class TwistedScreen(urwid.BaseScreen):
# Private
def _on_update_palette_entry(self, name, *attrspecs):
- # copy the attribute to a dictionary containing the escape seqences
+ # copy the attribute to a dictionary containing the escape sequences
self._pal_escape[name] = self._attrspec_to_escape(
attrspecs[{16:0,1:1,88:2,256:3}[self.colors]])
diff --git a/urwid/canvas.py b/urwid/canvas.py
index 593b252..d27e7ab 100644
--- a/urwid/canvas.py
+++ b/urwid/canvas.py
@@ -972,7 +972,7 @@ def shards_trim_top(shards, top):
shard_tail = shard_body_tail(num_rows, sbody)
top -= num_rows
else:
- raise CanvasError("tried to trim shards out of existance")
+ raise CanvasError("tried to trim shards out of existence")
sbody = shard_body(cviews, shard_tail, False)
shard_tail = shard_body_tail(num_rows, sbody)
diff --git a/urwid/container.py b/urwid/container.py
index 69a6110..aa81614 100755
--- a/urwid/container.py
+++ b/urwid/container.py
@@ -980,7 +980,7 @@ class Frame(Widget, WidgetContainerMixin):
This object may be used to read or update the contents of the Frame.
- The values are similar to the the list-like .contents objects used
+ The values are similar to the list-like .contents objects used
in other containers with (:class:`Widget`, options) tuples, but are
constrained to keys for each of the three usual parts of a Frame.
When other keys are used a :exc:`KeyError` will be raised.
@@ -1724,7 +1724,7 @@ class Columns(Widget, WidgetContainerMixin, WidgetContainerListContentsMixin):
are treated as box widgets, and *box_columns* is ignored.
If the Columns widget is treated as a flow widget then the rows
- are calcualated as the largest rows() returned from all columns
+ are calculated as the largest rows() returned from all columns
except the ones listed in *box_columns*. The box widgets in
*box_columns* will be displayed with this calculated number of rows,
filling the full height.
@@ -1972,7 +1972,7 @@ class Columns(Widget, WidgetContainerMixin, WidgetContainerListContentsMixin):
raise IndexError, "No Columns child widget at position %s" % (position,)
self.contents.focus = position
focus_position = property(_get_focus_position, _set_focus_position, doc="""
- index of child widget in focus. Raises IndexError if read when
+ index of child widget in focus. Raises :exc:`IndexError` if read when
Columns is empty, or when set to an invalid index.
""")
diff --git a/urwid/decoration.py b/urwid/decoration.py
index b6a5ea9..731eb91 100755
--- a/urwid/decoration.py
+++ b/urwid/decoration.py
@@ -310,7 +310,7 @@ class AttrWrap(AttrMap):
"""
Call getattr on wrapped widget. This has been the longstanding
behaviour of AttrWrap, but is discouraged. New code should be
- using AttrMap and .base_widget or .original_widget instad.
+ using AttrMap and .base_widget or .original_widget instead.
"""
return getattr(self._original_widget, name)
@@ -447,7 +447,7 @@ class Padding(WidgetDecoration):
:param left: a fixed number of columns to pad on the left
:type left: int
- :param right: a fixed number of columns to pad on thr right
+ :param right: a fixed number of columns to pad on the right
:type right: int
Clipping Mode: (width= ``'clip'``)
@@ -542,7 +542,7 @@ class Padding(WidgetDecoration):
def _get_width(self):
"""
- Return the padding widthment setting.
+ Return the padding width.
"""
return simplify_width(self._width_type, self._width_amount)
def _set_width(self, width):
diff --git a/urwid/graphics.py b/urwid/graphics.py
index adcff72..d3dd277 100755
--- a/urwid/graphics.py
+++ b/urwid/graphics.py
@@ -802,7 +802,7 @@ class ProgressBar(Widget):
def __init__(self, normal, complete, current=0, done=100, satt=None):
"""
- :param normal: display attribute for uncomplete part of progress bar
+ :param normal: display attribute for incomplete part of progress bar
:param complete: display attribute for complete part of progress bar
:param current: current progress
:param done: progress amount at 100%
diff --git a/urwid/listbox.py b/urwid/listbox.py
index e954f72..5370e23 100644
--- a/urwid/listbox.py
+++ b/urwid/listbox.py
@@ -821,7 +821,7 @@ class ListBox(Widget, WidgetContainerMixin):
of the focus widget is aligned with the top edge of the
listbox (default if unspecified)
:type offset_inset: int
- :param coming_from: eiter 'above', 'below' or unspecified `None`
+ :param coming_from: either 'above', 'below' or unspecified `None`
:type coming_from: str
:param cursor_coords: (x, y) tuple indicating the desired
column and row for the cursor, a (x,) tuple indicating only
diff --git a/urwid/main_loop.py b/urwid/main_loop.py
index 24d7c38..4677ab2 100755
--- a/urwid/main_loop.py
+++ b/urwid/main_loop.py
@@ -161,7 +161,7 @@ class MainLoop(object):
def set_alarm_at(self, tm, callback, user_data=None):
"""
Schedule an alarm at *tm* time that will call *callback* from the
- within the :meth`run` function. Returns a handle that may be passed to
+ within the :meth:`run` function. Returns a handle that may be passed to
:meth:`remove_alarm`.
:param tm: time to call callback e.g. ``time.time() + 5``
diff --git a/urwid/old_str_util.py b/urwid/old_str_util.py
index f2b9287..bb993f6 100755
--- a/urwid/old_str_util.py
+++ b/urwid/old_str_util.py
@@ -297,7 +297,7 @@ def within_double_byte(text, line_start, pos):
Return values:
0 -- not within dbe char, or double_byte_encoding == False
1 -- pos is on the 1st half of a dbe char
- 2 -- pos is on the 2nd half og a dbe char
+ 2 -- pos is on the 2nd half of a dbe char
"""
assert isinstance(text, bytes)
v = ord2(text[pos])
diff --git a/urwid/raw_display.py b/urwid/raw_display.py
index 1706078..f71175e 100644
--- a/urwid/raw_display.py
+++ b/urwid/raw_display.py
@@ -350,7 +350,7 @@ class Screen(BaseScreen, RealTerminal):
Return a list of integer file descriptors that should be
polled in external event loops to check for user input.
- Use this method if you are implementing yout own event loop.
+ Use this method if you are implementing your own event loop.
"""
if not self._started:
return []
@@ -379,7 +379,7 @@ class Screen(BaseScreen, RealTerminal):
def _run_input_iter(self):
def empty_resize_pipe():
# clean out the pipe used to signal external event loops
- # that a resize has occured
+ # that a resize has occurred
try:
while True: os.read(self._resize_pipe_rd, 1)
except OSError:
@@ -931,7 +931,7 @@ class Screen(BaseScreen, RealTerminal):
"""
entries - list of (index, red, green, blue) tuples.
- Attempt to set part of the terminal pallette (this does not work
+ Attempt to set part of the terminal palette (this does not work
on all terminals.) The changes are sent as a single escape
sequence so they should all take effect at the same time.
diff --git a/urwid/split_repr.py b/urwid/split_repr.py
index 1438995..8b5e24c 100755
--- a/urwid/split_repr.py
+++ b/urwid/split_repr.py
@@ -128,7 +128,7 @@ def remove_defaults(d, fn):
if varargs:
del args[-1]
- # create adictionary of args with default values
+ # create a dictionary of args with default values
ddict = dict(zip(args[len(args) - len(defaults):], defaults))
for k, v in d.items():
diff --git a/urwid/text_layout.py b/urwid/text_layout.py
index 4a76cc8..302c504 100644
--- a/urwid/text_layout.py
+++ b/urwid/text_layout.py
@@ -125,7 +125,7 @@ class StandardTextLayout(TextLayout):
width - number of available screen columns
wrap - wrapping mode used
- Returns a layout structure without aligmnent applied.
+ Returns a layout structure without alignment applied.
"""
nl, nl_o, sp_o = "\n", "\n", " "
if PYTHON3 and isinstance(text, bytes):
@@ -320,7 +320,7 @@ def line_width( segs ):
Return the screen column width of one line of a text layout structure.
This function ignores any existing shift applied to the line,
- represended by an (amount, None) tuple at the start of the line.
+ represented by an (amount, None) tuple at the start of the line.
"""
sc = 0
seglist = segs
@@ -353,7 +353,7 @@ def shift_line( segs, amount ):
def trim_line( segs, text, start, end ):
"""
Return a trimmed line of a text layout structure.
- text -- text to which this layout structre applies
+ text -- text to which this layout structure applies
start -- starting screen column
end -- ending screen column
"""
diff --git a/urwid/treetools.py b/urwid/treetools.py
index 2f65e49..26f0914 100644
--- a/urwid/treetools.py
+++ b/urwid/treetools.py
@@ -69,7 +69,7 @@ class TreeWidget(urwid.WidgetWrap):
def update_expanded_icon(self):
"""Update display widget text for parent widgets"""
- # icon is first element in colums indented widget
+ # icon is first element in columns indented widget
self._w.base_widget.widget_list[0] = [
self.unexpanded_icon, self.expanded_icon][self.expanded]
diff --git a/urwid/util.py b/urwid/util.py
index 0560b5d..12becca 100644
--- a/urwid/util.py
+++ b/urwid/util.py
@@ -439,7 +439,7 @@ class MetaSuper(type):
def int_scale(val, val_range, out_range):
"""
Scale val in the range [0, val_range-1] to an integer in the range
- [0, out_range-1]. This implementaton uses the "round-half-up" rounding
+ [0, out_range-1]. This implementation uses the "round-half-up" rounding
method.
>>> "%x" % int_scale(0x7, 0x10, 0x10000)