Commit 30befaf
authored
Open figures using the associated application on Windows (#952)
This PR improves the `launch_external_viewer` function to open images
using the associated application (just like double-click the images) on
Windows.
The implemention is done by calling the
[`os.startfile`](https://docs.python.org/3/library/os.html#os.startfile)
function.
`os.startfile` is only available on Windows, so need to disable the pylint
error `no-member`.
The code was originall written in #269 by @leouieda, re-used in #529.1 parent f7e2ce6 commit 30befaf
1 file changed
+7
-3
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | 3 | | |
| 4 | + | |
4 | 5 | | |
5 | 6 | | |
6 | 7 | | |
| |||
195 | 196 | | |
196 | 197 | | |
197 | 198 | | |
198 | | - | |
199 | | - | |
| 199 | + | |
| 200 | + | |
| 201 | + | |
200 | 202 | | |
201 | 203 | | |
202 | 204 | | |
| |||
214 | 216 | | |
215 | 217 | | |
216 | 218 | | |
| 219 | + | |
| 220 | + | |
217 | 221 | | |
218 | | - | |
| 222 | + | |
219 | 223 | | |
220 | 224 | | |
221 | 225 | | |
| |||
0 commit comments