summaryrefslogtreecommitdiff
path: root/pykfx/__init__.py
diff options
context:
space:
mode:
authorJon Bergli Heier <jonheier@start.no>2007-10-01 17:56:23 +0200
committerJon Bergli Heier <jonheier@start.no>2007-10-01 17:56:23 +0200
commita395b89a9f4729b0ee707d32074f3f66bcf6972a (patch)
treed93121313b2ea5c025e7625eb3c7f398ad44fb89 /pykfx/__init__.py
parentc062ac07e6241cf32a4a5655775aa037bdb1e76e (diff)
Added get_stripped to the Event-class to get an override-free line.
Diffstat (limited to 'pykfx/__init__.py')
-rw-r--r--pykfx/__init__.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/pykfx/__init__.py b/pykfx/__init__.py
index 4ef55f1..cac268d 100644
--- a/pykfx/__init__.py
+++ b/pykfx/__init__.py
@@ -104,6 +104,9 @@ class Event:
def __str__(self):
return '%s: %s' % (self.kind.capitalize(), ','.join([getattr(self, x.lower()) for x in self.format]))
+ def get_stripped(self):
+ return re.sub(r'\{[^}]*\}', '', self.text)
+
def parse(self, s):
s = s.split(': ', 1)
self.kind = s[0].lower()