-
Notifications
You must be signed in to change notification settings - Fork 33
Suggestion: optional textext dependency #17
Copy link
Copy link
Open
Description
In these lines: https://github.com/fsmMLK/inkscapeMadeEasy/blob/master/latest/inkscapeMadeEasy_Draw.py#L25-L49
The code unconditionally loads the textext Python module.
However, not all extensions need LaTeX (e.g. your inkscapeSpirograph, but the textext extension is still being required. Even your "Dimensions" extension has a checkbox "Use LaTeX", which makes me believe that dependency is optional.
How to implement this suggestion? You can try something like this (untested):
try:
import textext
except ImportError:
warn("The 'textext' inkscape extension was not found. If you get errors, please install it.")
textext = NoneAlternatively, I see textext is being called only two times in the codebase. Those calls could be prefixed by a check if textext is None, and only at that moment throw an error/warning with a helpful error message.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels