diff options
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_) |
