More automated cleanup

master
Guillaume Seguin 2012-08-08 09:58:09 +02:00
parent 77eb2440e3
commit 6f446e3726
20 changed files with 447 additions and 439 deletions

View File

@ -2,11 +2,19 @@ Some cleanup commands :
To add a space after each comma :
sed -e "s/\(\w\),\(\w\)/\1, \2/g" -i *.py printrun/*.py printrun/svg/*.py
sed -e "s/\(\w\),\(\"\)/\1, \2/g" -i *.py printrun/*.py printrun/svg/*.py
sed -e "s/\(\"\),\(\w\)/\1, \2/g" -i *.py printrun/*.py printrun/svg/*.py
sed -e "s/\(\"\),\(\"\)/\1, \2/g" -i *.py printrun/*.py printrun/svg/*.py
sed -e "s/\([)}\]]\),\(\w\)/\1, \2/g" -i *.py printrun/*.py printrun/svg/*.py
sed -e "s/\([)}\]]\),\([\[{(]\)/\1, \2/g" -i *.py printrun/*.py printrun/svg/*.py
sed -e "s/\(\w\),\([\[{(]\)/\1, \2/g" -i *.py printrun/*.py printrun/svg/*.py
To add spaces around each = :
sed -e "s/\(\w\)=\(\w\)/\1 = \2/g" -i *.py printrun/*.py printrun/svg/*.py
sed -e "s/\(\w\)=\(\"\)/\1 = \2/g" -i *.py printrun/*.py printrun/svg/*.py
sed -e "s/\(\w\)=\((\)/\1 = \2/g" -i *.py printrun/*.py printrun/svg/*.py
sed -e "s/\(\w\)=\((\)/\1 = \2/g" -i *.py printrun/*.py printrun/svg/*.py
sed -e "s/\(\w\)=\([\[{(]\)/\1 = \2/g" -i *.py printrun/*.py printrun/svg/*.py
To add spaces around each == :
sed -e "s/\(\w\)==\(\w\)/\1 == \2/g" -i *.py printrun/*.py printrun/svg/*.py

View File

@ -189,7 +189,7 @@ class PronterWindow(wx.Frame, pronsole.pronsole):
print "Print Started at: " + format_time(self.starttime)
def endcb(self):
if(self.p.queueindex == 0):
if self.p.queueindex == 0:
print "Print ended at: " + format_time(time.time())
print_duration = int(time.time () - self.starttime + self.extra_print_time)
print "and took: " + format_duration(print_duration)
@ -660,8 +660,8 @@ class PronterWindow(wx.Frame, pronsole.pronsole):
btn.Bind(wx.EVT_BUTTON, self.procbutton)
self.btndict[i[1]]=btn
self.printerControls.append(btn)
if(i[2]==None):
if(i[4]==0):
if i[2] == None:
if i[4] == 0:
llts.Add(btn)
else:
lls.Add(btn, pos = i[2], span = i[4])