diff --git a/wx/lib/agw/scrolledthumbnail.py b/wx/lib/agw/scrolledthumbnail.py index 22155816..ce8f187e 100644 --- a/wx/lib/agw/scrolledthumbnail.py +++ b/wx/lib/agw/scrolledthumbnail.py @@ -71,7 +71,7 @@ wxWidgets implementation of the :class:`ThumbnailCtrl` control. Andrea Gavana notes that :class:`ThumbnailCtrl` wouldn't have been so fast and complete without the suggestions and hints from Peter Damoc. -Usage: +Usage ===== Usage example:: diff --git a/wx/lib/masked/maskededit.py b/wx/lib/masked/maskededit.py index 87335d42..b99d0543 100644 --- a/wx/lib/masked/maskededit.py +++ b/wx/lib/masked/maskededit.py @@ -117,7 +117,7 @@ mask X Allow string.letters, string.punctuation, string.digits & Allow string.punctuation only (doesn't include all unicode symbols) \* Allow any visible character - | explicit field boundary (takes no space in the control; allows mix + \| Explicit field boundary (takes no space in the control; allows mix of adjacent mask characters to be treated as separate fields, eg: '&|###' means "field 0 = '&', field 1 = '###'", but there's no fixed characters in between. @@ -189,59 +189,67 @@ defaultEncoding formatcodes These other properties can be passed to the class when instantiating it: Formatcodes are specified as a string of single character formatting - codes that modify behavior of the control:: + codes that modify behavior of the control: - _ Allow spaces - ! Force upper - ^ Force lower - R Right-align field(s) - r Right-insert in field(s) (implies R) - < Stay in field until explicit navigation out of it + ======= ========================================================== + _ Allow spaces + ! Force upper + ^ Force lower + R Right-align field(s) + r Right-insert in field(s) (implies R) + < Stay in field until explicit navigation out of it - > Allow insert/delete within partially filled fields (as - opposed to the default "overwrite" mode for fixed-width - masked edit controls.) This allows single-field controls - or each field within a multi-field control to optionally - behave more like standard text controls. - (See EMAIL or phone number autoformat examples.) + > Allow insert/delete within partially filled fields (as + opposed to the default "overwrite" mode for fixed-width + masked edit controls.) This allows single-field controls + or each field within a multi-field control to optionally + behave more like standard text controls. + (See EMAIL or phone number autoformat examples.) - *Note: This also governs whether backspace/delete operations - shift contents of field to right of cursor, or just blank the - erased section. + .. note:: - Also, when combined with 'r', this indicates that the field - or control allows right insert anywhere within the current - non-empty value in the field. (Otherwise right-insert behavior - is only performed to when the entire right-insertable field is - selected or the cursor is at the right edge of the field.* + This also governs whether backspace/delete operations + shift contents of field to right of cursor, or just blank + the erased section. + + Also, when combined with 'r', this indicates that the field + or control allows right insert anywhere within the current + non-empty value in the field. (Otherwise right-insert behavior + is only performed to when the entire right-insertable field is + selected or the cursor is at the right edge of the field. - , Allow grouping character in integer fields of numeric controls - and auto-group/regroup digits (if the result fits) when leaving - such a field. (If specified, .SetValue() will attempt to - auto-group as well.) - ',' is also the default grouping character. To change the - grouping character and/or decimal character, use the groupChar - and decimalChar parameters, respectively. - Note: typing the "decimal point" character in such fields will - clip the value to that left of the cursor for integer - fields of controls with "integer" or "floating point" masks. - If the ',' format code is specified, this will also cause the - resulting digits to be regrouped properly, using the current - grouping character. - - Prepend and reserve leading space for sign to mask and allow - signed values (negative #s shown in red by default.) Can be - used with argument useParensForNegatives (see below.) - 0 integer fields get leading zeros - D Date[/time] field - T Time field - F Auto-Fit: the control calculates its size from - the length of the template mask - V validate entered chars against validRegex before allowing them - to be entered vs. being allowed by basic mask and then having - the resulting value just colored as invalid. - (See USSTATE autoformat demo for how this can be used.) - S select entire field when navigating to new field + , Allow grouping character in integer fields of numeric controls + and auto-group/regroup digits (if the result fits) when leaving + such a field. (If specified, .SetValue() will attempt to + auto-group as well.) + ',' is also the default grouping character. To change the + grouping character and/or decimal character, use the groupChar + and decimalChar parameters, respectively. + + .. note:: + + Typing the "decimal point" character in such fields will + clip the value to that left of the cursor for integer + fields of controls with "integer" or "floating point" masks. + + If the ',' format code is specified, this will also cause the + resulting digits to be regrouped properly, using the current + grouping character. + \- Prepend and reserve leading space for sign to mask and allow + signed values (negative #s shown in red by default.) Can be + used with argument useParensForNegatives (see below.) + 0 Integer fields get leading zeros + D Date[/time] field + T Time field + F Auto-Fit: the control calculates its size from + the length of the template mask + V Validate entered chars against validRegex before allowing them + to be entered vs. being allowed by basic mask and then having + the resulting value just colored as invalid. + (See USSTATE autoformat demo for how this can be used.) + S Select entire field when navigating to new field + ======= ========================================================== fillChar diff --git a/wx/lib/masked/numctrl.py b/wx/lib/masked/numctrl.py index d0177d19..284f7a5a 100644 --- a/wx/lib/masked/numctrl.py +++ b/wx/lib/masked/numctrl.py @@ -89,7 +89,7 @@ masked.NumCtrl: emptyBackgroundColour = "White", validBackgroundColour = "White", invalidBackgroundColour = "Yellow", - autoSize = True + autoSize = True, ) diff --git a/wx/lib/plot/examples/demo.py b/wx/lib/plot/examples/demo.py index ce1767b1..4bb63437 100644 --- a/wx/lib/plot/examples/demo.py +++ b/wx/lib/plot/examples/demo.py @@ -7,10 +7,14 @@ demo.py ======= -This is a demo showing some of the capabilities of the :mod:`wx.lib.plot` -package. It is intended to be run as a standalone script via:: +.. highlight:: shell - user@host:.../site-packages/wx/lib/plot$ python examples/demo.py +This is a demo showing some of the capabilities of the :mod:`wx.lib.plot` +package. + +It is intended to be run as a standalone script via:: + + user@host:.../site-packages/wx/lib/plot$ python examples/demo.py """ __docformat__ = "restructuredtext en" diff --git a/wx/lib/plot/examples/simple_example.py b/wx/lib/plot/examples/simple_example.py index e8f539c8..b120bfe0 100644 --- a/wx/lib/plot/examples/simple_example.py +++ b/wx/lib/plot/examples/simple_example.py @@ -1,10 +1,12 @@ # -*- coding: utf-8 -*- """ +.. highlight:: shell + A simple example showing how to use lib.plot from wxPython. It is intended to be run as a standalone script via:: - user@host:.../site-packages/wx/lib/plot$ python examples/simple_example.py + user@host:.../site-packages/wx/lib/plot$ python examples/simple_example.py """ __docformat__ = "restructuredtext en" diff --git a/wx/lib/plot/polyobjects.py b/wx/lib/plot/polyobjects.py index be9ab831..81f5d27b 100644 --- a/wx/lib/plot/polyobjects.py +++ b/wx/lib/plot/polyobjects.py @@ -120,7 +120,7 @@ class PolyPoints(object): :type: tuple of bool, length 2 :raises ValueError: when setting an invalid value - .. notes:: + .. note:: This is a simplified example of how SymLog works:: @@ -163,7 +163,7 @@ class PolyPoints(object): :type: tuple of float, length 2 :raises ValueError: when setting an invalid value - .. notes:: + .. note:: This is a simplified example of how SymLog works:: @@ -221,7 +221,7 @@ class PolyPoints(object): :setter: Sets the value of points. :type: list of `(x, y)` pairs - .. Note:: + .. note:: Only set unscaled points - do not perform the log, abs, or symlog adjustments yourself. @@ -1010,17 +1010,10 @@ class PolyBoxPlot(PolyPoints): outliers are outside of 1.5 * IQR - Parameters - ---------- - data : array-like - The data to plot - - Returns - ------- - bpdata : collections.namedtuple - Descriptive statistics for data: + :param array-like data: The data to plot + :return bpdata: Descriptive statistics for data: (min_data, low_whisker, q25, median, q75, high_whisker, max_data) - + :rtype: collections.namedtuple """ data = self._clean_data(data) @@ -1066,20 +1059,20 @@ class PolyBoxPlot(PolyPoints): """ Draws a box plot on the DC. - Notes - ----- - The following draw order is required: + .. note:: - 1. First the whisker line - 2. Then the IQR box - 3. Lasly the median line. + The following draw order is required: - This is because + 1. First the whisker line + 2. Then the IQR box + 3. Lasly the median line. - + The whiskers are drawn as single line rather than two lines - + The median line must be visible over the box if the box has a fill. + This is because - Other than that, the draw order can be changed. + + The whiskers are drawn as single line rather than two lines + + The median line must be visible over the box if the box has a fill. + + Other than that, the draw order can be changed. """ self._draw_whisker(dc, printerScale) self._draw_iqr_box(dc, printerScale)