diff options
| author | tassaron | 2017-06-08 20:32:25 -0400 |
|---|---|---|
| committer | tassaron | 2017-06-08 20:32:25 -0400 |
| commit | 4fc73f1e094289b50f828f0a3128d710e1d9ec4c (patch) | |
| tree | cc9f1b633c3f71f1caeed9688b4e9564513976b8 /core.py | |
| parent | bb1e54b31eb6157ef041764cfccd60484a0e02d8 (diff) | |
rename and delete buttons in preset manager
Diffstat (limited to 'core.py')
| -rw-r--r-- | core.py | 10 |
1 files changed, 10 insertions, 0 deletions
@@ -14,6 +14,7 @@ from collections import OrderedDict import json from importlib import import_module from PyQt4.QtGui import QDesktopServices +import string class Core(): @@ -178,6 +179,15 @@ class Core(): self.canceled = False @staticmethod + def badName(name): + '''Returns whether a name contains non-alphanumeric chars''' + badName = False + for letter in name: + if letter in string.punctuation: + badName = True + return badName + + @staticmethod def stringOrderedDict(dictionary): sorted_ = OrderedDict(sorted(dictionary.items(), key=lambda t: t[0])) return repr(sorted_) |
