git://git.onelab.eu
/
sface.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
eb6b726
)
XML att values can have spaces, i.e. VINI topology description. Now I handle that.
author
Giovanni Gherdovich
<ggherdov@brentaal.inria.fr>
Fri, 22 Oct 2010 10:32:59 +0000
(12:32 +0200)
committer
Giovanni Gherdovich
<ggherdov@brentaal.inria.fr>
Fri, 22 Oct 2010 10:32:59 +0000
(12:32 +0200)
sface/xmlwidget.py
patch
|
blob
|
history
diff --git
a/sface/xmlwidget.py
b/sface/xmlwidget.py
index
2c0f53c
..
d72f8e8
100644
(file)
--- a/
sface/xmlwidget.py
+++ b/
sface/xmlwidget.py
@@
-1,5
+1,6
@@
import os
import sys
+import re
from PyQt4.QtCore import *
from PyQt4.QtGui import *
@@
-238,9
+239,12
@@
class ElemNodeDelegate(QAbstractItemDelegate):
AttListHtml = ''
if len(tmp) > 1:
# many elems don't have atts...
- attList = tmp[1].split()
+ pttrnAtt = ' *?.+.?=".*?"'
+ print "TMP", tmp
+ attList = re.compile(pttrnAtt, re.DOTALL).findall(tmp[1])
for att in attList:
tmp = att.split('=')
+ print "TMP2", tmp
attName = tmp[0]
attValue = tmp[1][1:-1]
AttListHtml += (attPattern % (attName, attValue))