From 645c0a0ea5d9644228859598477b1bce22e569e3 Mon Sep 17 00:00:00 2001 From: Leonardo Robol Date: Sun, 19 Apr 2009 19:11:09 +0200 Subject: [PATCH] Removed debug lines in latex_manager and songbook-editor --- latex_manager.py | 6 +++--- songbook-editor.py | 4 +++- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/latex_manager.py b/latex_manager.py index f9a8b07..73c9ab7 100644 --- a/latex_manager.py +++ b/latex_manager.py @@ -43,7 +43,7 @@ class latex_manager(): def sub_chord(self,m): j = 0 - print j, len(m) + # print j, len(m) this is just debug! while(j < len(m)): if(m[j] == '['): # We have a chord!, then... @@ -54,11 +54,11 @@ class latex_manager(): # 2) Are there count + 1 words "free" after the chord? free = count + 2 for i in range(j + count + 2,j + count + 2 + (count + 2) ): - print "m[i] = ", m[i] + # print "m[i] = ", m[i] Removing debug if( (m[i] == '\n') | (m[i] == '[') | (m[i] == '{') ): free = i - j - count - 2 break - print "free = " , free + # Debug is unuseful now! print "free = " , free # Free what we need...and rebuild the new string... m = m[0:j] + "\Ch{" + m[j+1:j+count+1] + "}{" + m[j+count+2:j+count+free+2] + "}" + m[j+count+free+2:len(m)] j = j + count + free + 3 diff --git a/songbook-editor.py b/songbook-editor.py index 1d6cae4..9ab80e8 100755 --- a/songbook-editor.py +++ b/songbook-editor.py @@ -11,6 +11,7 @@ class interface(QtGui.QMainWindow): super(interface, self).__init__(parent) self.ui = Ui_MainWindow() self.ui.setupUi(self) + # Create an empty database of songs... self.song_db = [] @@ -56,7 +57,8 @@ class interface(QtGui.QMainWindow): newsong = song(newtitle, [], newmauthor, newtauthor, newtone, newyear) newbody = unicode(self.ui.te_body.toPlainText()) - print newbody + # Just debug + # print newbody newbody = re.split("\n\n+", newbody) for paragraph in newbody: if(len(paragraph) < 3): -- 2.1.4