enthought / enthought/enable

SVGButton not available for the null toolkit

Open
#162 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
C
Stars
97
Forks
45
PR merge metrics
No merged PRs in 30d

Description

We have some code that can run either graphically or in the terminal and importing the SVGButton editor is causing problems.

Seems like it would be straightforward to provide a simple mock for this in the null toolkit.

```
Traceback (most recent call last):
File "./print_device_details.py", line 7, in
import settings_view
File "/home/fnoble/piksi_firmware/scripts/testing/../settings_view.py", line 15, in
from enable.savage.trait_defs.ui.svg_button import SVGButton
File "/usr/lib/python2.7/dist-packages/enable/savage/trait_defs/ui/svg_button.py", line 19, in
from svg_button_editor import SVGButtonEditor
File "/usr/lib/python2.7/dist-packages/enable/savage/trait_defs/ui/svg_button_editor.py", line 22, in
from enable.savage.trait_defs.ui.toolkit import toolkit_object
File "/usr/lib/python2.7/dist-packages/enable/savage/trait_defs/ui/toolkit.py", line 43, in
_init_toolkit()
File "/usr/lib/python2.7/dist-packages/enable/savage/trait_defs/ui/toolkit.py", line 36, in _init_toolkit
"toolkit." % ETSConfig.toolkit
ImportError: Unable to import a Savage backend for the null toolkit.
```

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.