|
7 | 7 | arguments; the red, green, and blue values of the selected color. |
8 | 8 |
|
9 | 9 | - When a Viewer selects a color and wishes to update all other Views, it |
10 | | - should call update_views() on the Switchboard object. Not that the |
11 | | - Viewer typically does *not* update itself before calling update_views(), |
| 10 | + should call update_views() on the Switchboard object. Note that the |
| 11 | + Viewer typically does *not* update itself before calling update_views(), |
12 | 12 | since this would cause it to get updated twice. |
13 | 13 |
|
14 | 14 | Optionally, Viewers can also implement: |
|
23 | 23 | unmapped. All Viewers should implement this. |
24 | 24 |
|
25 | 25 | - colordb_changed() which takes a single argument, an instance of |
26 | | - ColorDB. This is called whenever the color name database is changed and |
| 26 | + ColorDB. This is called whenever the color name database is changed and |
27 | 27 | gives a chance for the Viewers to do something on those events. See |
28 | 28 | ListViewer for details. |
29 | 29 |
|
30 | | -External Viewers are found dynamically. Viewer modules should have names such |
| 30 | +External Viewers are found dynamically. Viewer modules should have names such |
31 | 31 | as FooViewer.py. If such a named module has a module global variable called |
32 | 32 | ADDTOVIEW and this variable is true, the Viewer will be added dynamically to |
33 | 33 | the `View' menu. ADDTOVIEW contains a string which is used as the menu item |
@@ -64,7 +64,7 @@ def __init__(self, initfile): |
64 | 64 | try: |
65 | 65 | fp = open(initfile) |
66 | 66 | self.__optiondb = marshal.load(fp) |
67 | | - if type(self.__optiondb) <> DictType: |
| 67 | + if not isinstance(self.__optiondb, DictType): |
68 | 68 | print >> sys.stderr, \ |
69 | 69 | 'Problem reading options from file:', initfile |
70 | 70 | self.__optiondb = {} |
|
0 commit comments