small fixes for new modules
This commit is contained in:
parent
a5f3d5ac9c
commit
a336728006
@ -95,6 +95,7 @@ def parseString(lines, start=0):
|
|||||||
data = OrderedDict()
|
data = OrderedDict()
|
||||||
if isinstance(lines, basestring):
|
if isinstance(lines, basestring):
|
||||||
lines = lines.split('\n')
|
lines = lines.split('\n')
|
||||||
|
lines = filter(lambda l: re.search(r'\S', l) and not re.match(r'\s*#', l), lines) ## remove empty lines
|
||||||
|
|
||||||
indent = measureIndent(lines[start])
|
indent = measureIndent(lines[start])
|
||||||
ln = start - 1
|
ln = start - 1
|
||||||
@ -179,14 +180,20 @@ if __name__ == '__main__':
|
|||||||
tf = open(fn, 'w')
|
tf = open(fn, 'w')
|
||||||
cf = """
|
cf = """
|
||||||
key: 'value'
|
key: 'value'
|
||||||
key2:
|
key2: ##comment
|
||||||
key21: 'value'
|
##comment
|
||||||
|
key21: 'value' ## comment
|
||||||
|
##comment
|
||||||
key22: [1,2,3]
|
key22: [1,2,3]
|
||||||
key23: 234 #comment
|
key23: 234 #comment
|
||||||
"""
|
"""
|
||||||
tf.write(cf)
|
tf.write(cf)
|
||||||
tf.close()
|
tf.close()
|
||||||
print "=== Test:==="
|
print "=== Test:==="
|
||||||
|
num = 1
|
||||||
|
for line in cf.split('\n'):
|
||||||
|
print "%02d %s" % (num, line)
|
||||||
|
num += 1
|
||||||
print cf
|
print cf
|
||||||
print "============"
|
print "============"
|
||||||
data = readConfigFile(fn)
|
data = readConfigFile(fn)
|
||||||
|
@ -1,5 +1,8 @@
|
|||||||
# -*- coding: utf-8 -*-
|
# -*- coding: utf-8 -*-
|
||||||
from pyqtgraph.Qt import QtCore, QtGui
|
from pyqtgraph.Qt import QtCore, QtGui
|
||||||
|
|
||||||
|
__all__ = ['FeedbackButton']
|
||||||
|
|
||||||
class FeedbackButton(QtGui.QPushButton):
|
class FeedbackButton(QtGui.QPushButton):
|
||||||
"""
|
"""
|
||||||
QPushButton which flashes success/failure indication for slow or asynchronous procedures.
|
QPushButton which flashes success/failure indication for slow or asynchronous procedures.
|
||||||
|
Loading…
Reference in New Issue
Block a user