small fixes for new modules

This commit is contained in:
Luke Campagnola 2012-04-04 22:54:46 -04:00
parent a5f3d5ac9c
commit a336728006
2 changed files with 12 additions and 2 deletions

View File

@ -95,6 +95,7 @@ def parseString(lines, start=0):
data = OrderedDict()
if isinstance(lines, basestring):
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])
ln = start - 1
@ -179,14 +180,20 @@ if __name__ == '__main__':
tf = open(fn, 'w')
cf = """
key: 'value'
key2:
key21: 'value'
key2: ##comment
##comment
key21: 'value' ## comment
##comment
key22: [1,2,3]
key23: 234 #comment
"""
tf.write(cf)
tf.close()
print "=== Test:==="
num = 1
for line in cf.split('\n'):
print "%02d %s" % (num, line)
num += 1
print cf
print "============"
data = readConfigFile(fn)

View File

@ -1,5 +1,8 @@
# -*- coding: utf-8 -*-
from pyqtgraph.Qt import QtCore, QtGui
__all__ = ['FeedbackButton']
class FeedbackButton(QtGui.QPushButton):
"""
QPushButton which flashes success/failure indication for slow or asynchronous procedures.