diff options
| author | Aaron Spike <aaron@ekips.org> | 2006-05-08 15:28:17 +0000 |
|---|---|---|
| committer | acspike <acspike@users.sourceforge.net> | 2006-05-08 15:28:17 +0000 |
| commit | 5003d4122450f1ea8d75a5f77f96b829908a7dee (patch) | |
| tree | bc478eb71aab76366fd036b788fa2fd4ae9be807 /share/extensions/dxf_outlines.py | |
| parent | More snapping cleanups. (diff) | |
| download | inkscape-5003d4122450f1ea8d75a5f77f96b829908a7dee.tar.gz inkscape-5003d4122450f1ea8d75a5f77f96b829908a7dee.zip | |
standardize indents on 4 spaces
Python hates mixed whitespace
(bzr r770)
Diffstat (limited to 'share/extensions/dxf_outlines.py')
| -rwxr-xr-x | share/extensions/dxf_outlines.py | 28 |
1 files changed, 14 insertions, 14 deletions
diff --git a/share/extensions/dxf_outlines.py b/share/extensions/dxf_outlines.py index 01e7b0633..176412ea3 100755 --- a/share/extensions/dxf_outlines.py +++ b/share/extensions/dxf_outlines.py @@ -20,21 +20,21 @@ import inkex, simplepath, cubicsuperpath, re uuconv = {'in':90.0, 'pt':1.25, 'px':1, 'mm':3.5433070866, 'cm':35.433070866, 'pc':15.0}
def unittouu(string):
- unit = re.compile('(%s)$' % '|'.join(uuconv.keys()))
- param = re.compile(r'(([-+]?[0-9]+(\.[0-9]*)?|[-+]?\.[0-9]+)([eE][-+]?[0-9]+)?)')
+ unit = re.compile('(%s)$' % '|'.join(uuconv.keys()))
+ param = re.compile(r'(([-+]?[0-9]+(\.[0-9]*)?|[-+]?\.[0-9]+)([eE][-+]?[0-9]+)?)')
- p = param.match(string)
- u = unit.search(string)
- if p:
- retval = float(p.string[p.start():p.end()])
- else:
- retval = 0.0
- if u:
- try:
- return retval * uuconv[u.string[u.start():u.end()]]
- except KeyError:
- pass
- return retval
+ p = param.match(string)
+ u = unit.search(string)
+ if p:
+ retval = float(p.string[p.start():p.end()])
+ else:
+ retval = 0.0
+ if u:
+ try:
+ return retval * uuconv[u.string[u.start():u.end()]]
+ except KeyError:
+ pass
+ return retval
class MyEffect(inkex.Effect): def __init__(self): |
