diff options
| author | Raphaël Bournhonesque <raphael0202@yahoo.fr> | 2016-03-25 18:18:31 +0000 |
|---|---|---|
| committer | Raphaël Bournhonesque <raphael0202@yahoo.fr> | 2016-03-25 18:18:31 +0000 |
| commit | 2a72b54dadf9d8ca7cc1391b5eedb6396cb97fc4 (patch) | |
| tree | 3b52b62b9f35a5595c0e28f343943b6077c222b4 | |
| parent | Remove deprecated has_key method in inkex.py (diff) | |
| download | inkscape-2a72b54dadf9d8ca7cc1391b5eedb6396cb97fc4.tar.gz inkscape-2a72b54dadf9d8ca7cc1391b5eedb6396cb97fc4.zip | |
Cosmetics to make inkex.py pep8 compliant
(bzr r14743)
| -rwxr-xr-x | share/extensions/inkex.py | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/share/extensions/inkex.py b/share/extensions/inkex.py index 0aee3c21a..8a51734c3 100755 --- a/share/extensions/inkex.py +++ b/share/extensions/inkex.py @@ -35,7 +35,7 @@ import re import sys from math import * -#a dictionary of all of the xmlns prefixes in a standard inkscape doc +# a dictionary of all of the xmlns prefixes in a standard inkscape doc NSS = { u'sodipodi' :u'http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd', u'cc' :u'http://creativecommons.org/ns#', @@ -100,9 +100,9 @@ def errormsg(msg): inkex.errormsg(_("This extension requires two selected paths.")) """ if isinstance(msg, unicode): - sys.stderr.write(msg.encode("UTF-8") + "\n") + sys.stderr.write(msg.encode("utf-8") + "\n") else: - sys.stderr.write((unicode(msg, "utf-8", errors='replace') + "\n").encode("UTF-8")) + sys.stderr.write((unicode(msg, "utf-8", errors='replace') + "\n").encode("utf-8")) def are_near_relative(a, b, eps): @@ -205,7 +205,7 @@ class Effect: def getposinlayer(self): #defaults self.current_layer = self.document.getroot() - self.view_center = (0.0,0.0) + self.view_center = (0.0, 0.0) layerattr = self.document.xpath('//sodipodi:namedview/@inkscape:current-layer', namespaces=NSS) if layerattr: @@ -278,7 +278,8 @@ class Effect: self.getselected() self.getdocids() self.effect() - if output: self.output() + if output: + self.output() def uniqueId(self, old_id, make_new_id=True): new_id = old_id @@ -297,8 +298,8 @@ class Effect: return retval # a dictionary of unit to user unit conversion factors - __uuconv = {'in':96.0, 'pt':1.33333333333, 'px':1.0, 'mm':3.77952755913, 'cm':37.7952755913, - 'm':3779.52755913, 'km':3779527.55913, 'pc':16.0, 'yd':3456.0 , 'ft':1152.0} + __uuconv = {'in': 96.0, 'pt': 1.33333333333, 'px': 1.0, 'mm': 3.77952755913, 'cm': 37.7952755913, + 'm': 3779.52755913, 'km': 3779527.55913, 'pc': 16.0, 'yd': 3456.0, 'ft': 1152.0} # Fault tolerance for lazily defined SVG def getDocumentWidth(self): |
