Commit a3367280 authored by Luke Campagnola's avatar Luke Campagnola
Browse files

small fixes for new modules

parent a5f3d5ac
...@@ -95,6 +95,7 @@ def parseString(lines, start=0): ...@@ -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__': ...@@ -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)
......
# -*- 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.
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment