Show More
@@ -196,8 +196,10 b' class Widget(LoggingConfigurable):' | |||||
196 | Parameters |
|
196 | Parameters | |
197 | ---------- |
|
197 | ---------- | |
198 | callback: callable |
|
198 | callback: callable | |
199 | callback will be passed two arguments when a message arrives: |
|
199 | callback will be passed two arguments when a message arrives:: | |
|
200 | ||||
200 | callback(widget, content) |
|
201 | callback(widget, content) | |
|
202 | ||||
201 | remove: bool |
|
203 | remove: bool | |
202 | True if the callback should be unregistered.""" |
|
204 | True if the callback should be unregistered.""" | |
203 | self._msg_callbacks.register_callback(callback, remove=remove) |
|
205 | self._msg_callbacks.register_callback(callback, remove=remove) | |
@@ -208,8 +210,10 b' class Widget(LoggingConfigurable):' | |||||
208 | Parameters |
|
210 | Parameters | |
209 | ---------- |
|
211 | ---------- | |
210 | callback: method handler |
|
212 | callback: method handler | |
211 | Must have a signature of: |
|
213 | Must have a signature of:: | |
|
214 | ||||
212 | callback(widget, **kwargs) |
|
215 | callback(widget, **kwargs) | |
|
216 | ||||
213 | kwargs from display are passed through without modification. |
|
217 | kwargs from display are passed through without modification. | |
214 | remove: bool |
|
218 | remove: bool | |
215 | True if the callback should be unregistered.""" |
|
219 | True if the callback should be unregistered.""" |
@@ -47,9 +47,11 b" def pandoc(source, fmt, to, extra_args=None, encoding='utf-8'):" | |||||
47 | out : unicode |
|
47 | out : unicode | |
48 | Output as returned by pandoc. |
|
48 | Output as returned by pandoc. | |
49 |
|
49 | |||
50 | Exceptions |
|
50 | Raises | |
51 |
------ |
|
51 | ------ | |
52 | This function will raise PandocMissing if pandoc is not installed. |
|
52 | PandocMissing | |
|
53 | If pandoc is not installed. | |||
|
54 | ||||
53 | Any error messages generated by pandoc are printed to stderr. |
|
55 | Any error messages generated by pandoc are printed to stderr. | |
54 |
|
56 | |||
55 | """ |
|
57 | """ | |
@@ -70,15 +72,14 b" def pandoc(source, fmt, to, extra_args=None, encoding='utf-8'):" | |||||
70 | def get_pandoc_version(): |
|
72 | def get_pandoc_version(): | |
71 | """Gets the Pandoc version if Pandoc is installed. |
|
73 | """Gets the Pandoc version if Pandoc is installed. | |
72 |
|
74 | |||
73 | Return |
|
|||
74 | ------ |
|
|||
75 | If the minimal version is not met, it will probe Pandoc for its version, cache it and return that value. |
|
75 | If the minimal version is not met, it will probe Pandoc for its version, cache it and return that value. | |
76 | If the minimal version is met, it will return the cached version and stop probing Pandoc |
|
76 | If the minimal version is met, it will return the cached version and stop probing Pandoc | |
77 | (unless `clean_cache()` is called). |
|
77 | (unless :func:`clean_cache()` is called). | |
78 |
|
78 | |||
79 | Exceptions |
|
79 | Raises | |
80 |
------ |
|
80 | ------ | |
81 | PandocMissing will be raised if pandoc is unavailable. |
|
81 | PandocMissing | |
|
82 | If pandoc is unavailable. | |||
82 | """ |
|
83 | """ | |
83 | global __version |
|
84 | global __version | |
84 |
|
85 | |||
@@ -95,9 +96,10 b' def get_pandoc_version():' | |||||
95 | def check_pandoc_version(): |
|
96 | def check_pandoc_version(): | |
96 | """Returns True if minimal pandoc version is met. |
|
97 | """Returns True if minimal pandoc version is met. | |
97 |
|
98 | |||
98 | Exceptions |
|
99 | Raises | |
99 |
------ |
|
100 | ------ | |
100 | PandocMissing will be raised if pandoc is unavailable. |
|
101 | PandocMissing | |
|
102 | If pandoc is unavailable. | |||
101 | """ |
|
103 | """ | |
102 | v = get_pandoc_version() |
|
104 | v = get_pandoc_version() | |
103 | ok = check_version(v , _minimal_version ) |
|
105 | ok = check_version(v , _minimal_version ) |
General Comments 0
You need to be logged in to leave comments.
Login now