using 4 spaces to indent

git-svn-id: http://galileo.dmi.unict.it/svn/relational/trunk@58 014f5005-505e-4b48-8d0a-63407b615a7c
This commit is contained in:
LtWorf 2008-11-15 13:15:26 +00:00
parent 4bf2f915c6
commit 60c949784b
4 changed files with 261 additions and 264 deletions

View File

@ -66,12 +66,8 @@ def parse(expr):
if len(starts)==0: #No parenthesis: no operators with parameters
return parse_op(expr)
while len(starts)>0:
#Converting the last complex operator into python
end=starts.pop()
start=starts.pop()
@ -115,8 +111,6 @@ def parse(expr):
#Last complex operator is replaced with it's python code
#Next cycle will do the same to the new last unparsed complex operator
#At the end, parse_op will convert operators without parameters
return parse_op(expr)
def parse_op(expr):
@ -147,7 +141,6 @@ def parse_op(expr):
for j in symbols:
quotes[i]=quotes[i].replace(j,"_____%s_____"% (j))
#The parts outside the quotes was parsed, put the string together again
if (len(quotes)>1):
expr= '"'.join(quotes)
@ -162,7 +155,6 @@ def parse_op(expr):
if tokens[i] not in symbols:
result+=tokens[i].strip()
else:
result+=symbols[tokens[i]] % (tokens[i+1].strip())
i+=1
i+=1

View File

@ -27,6 +27,9 @@ import maingui
version="0.7"
if __name__ == "__main__":
if len (sys.argv) > 1 and sys.argv[1] == "-v":
print version
sys.exit(0)
app = QtGui.QApplication(sys.argv)
Form = QtGui.QWidget()

View File

@ -56,7 +56,6 @@ class rdate (object):
def __add__(self,days):
res=self.intdate+datetime.timedelta(days)
return rdate(res.__str__())
def __eq__(self,other):
return self.intdate==other.intdate
def __ge__(self,other):

View File

@ -22,10 +22,12 @@ import urllib
class surveyForm (QtGui.QWidget):
'''This class is the form used for the survey, needed to intercept the events'''
'''This class is the form used for the survey, needed to intercept the events.
It also sends the data with http POST to a page hosted on galileo'''
def setUi(self,ui):
self.ui=ui
def send(self):
'''Sends the data inserted in the form'''
#Creates the string
post="Relational algebra\n"
post+="system:" + str(self.ui.txtSystem.text().toUtf8())+ "\n"
@ -35,6 +37,7 @@ class surveyForm (QtGui.QWidget):
post+="find:" + str(self.ui.txtFind.text().toUtf8())+ "\n"
post+="comments:" + str(self.ui.txtComments.toPlainText().toUtf8())
#Clears the form
self.ui.txtSystem.clear()
self.ui.txtCountry.clear()
self.ui.txtSchool.clear()