summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 9aa41f8)
raw | patch | inline | side by side (parent: 9aa41f8)
author | pjrm <pjrm@users.sourceforge.net> | |
Fri, 27 Feb 2009 02:37:22 +0000 (02:37 +0000) | ||
committer | pjrm <pjrm@users.sourceforge.net> | |
Fri, 27 Feb 2009 02:37:22 +0000 (02:37 +0000) |
share/extensions/inkex.py | patch | blob | history |
index adc0d0fed59e6f246ecb855314ec9a78b2a1d02e..c76717fb8f5c5ca05ac472c162d6cb8068f137d7 100755 (executable)
"""A class for creating Inkscape SVG Effects"""
def __init__(self, *args, **kwargs):
- self.id_characters = '0123456789abcdefghijklmnopqrstuvwkyzABCDEFGHIJKLMNOPQRSTUVWXYZ'
self.document=None
self.ctx=None
self.selected={}
self.getdocids()
self.effect()
if output: self.output()
-
+
def uniqueId(self, old_id, make_new_id = True):
new_id = old_id
if make_new_id:
while new_id in self.doc_ids:
- new_id = "%s%s" % (new_id,random.choice(self.id_characters))
+ new_id += random.choice('0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ')
self.doc_ids[new_id] = 1
return new_id