aboutsummaryrefslogtreecommitdiff
path: root/core.py
diff options
context:
space:
mode:
Diffstat (limited to 'core.py')
-rw-r--r--core.py10
1 files changed, 10 insertions, 0 deletions
diff --git a/core.py b/core.py
index 797749d..06367cf 100644
--- a/core.py
+++ b/core.py
@@ -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_)