diff options
| author | Lex Neva <lexelby@users.noreply.github.com> | 2018-11-14 20:23:06 -0500 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2018-11-14 20:23:06 -0500 |
| commit | f5c85183d9c874fca806917e50992daea4101496 (patch) | |
| tree | a2450e2e37a7d94625a917240e78eadc939fd65b /lib/utils | |
| parent | 238ad843dd658de6c7afd5b8697c0e080b1cf965 (diff) | |
basic lettering (#344)
Can handle multiple lines of text and routes the stitching in alternating directions on each line.
Diffstat (limited to 'lib/utils')
| -rw-r--r-- | lib/utils/__init__.py | 1 | ||||
| -rw-r--r-- | lib/utils/string.py | 5 |
2 files changed, 6 insertions, 0 deletions
diff --git a/lib/utils/__init__.py b/lib/utils/__init__.py index 78d037f1..a6ae4374 100644 --- a/lib/utils/__init__.py +++ b/lib/utils/__init__.py @@ -3,3 +3,4 @@ from cache import cache from io import * from inkscape import * from paths import * +from string import * diff --git a/lib/utils/string.py b/lib/utils/string.py new file mode 100644 index 00000000..a7839f7d --- /dev/null +++ b/lib/utils/string.py @@ -0,0 +1,5 @@ +def string_to_floats(string, delimiter=","): + """Convert a string of delimiter-separated floats into a list of floats.""" + + floats = string.split(delimiter) + return [float(num) for num in floats] |
