From cdd771462d58aae319e0f565b857f1f97e3930c3 Mon Sep 17 00:00:00 2001 From: LtWorf Date: Mon, 17 Oct 2011 21:26:01 +0000 Subject: [PATCH] - command line interface using new API git-svn-id: http://galileo.dmi.unict.it/svn/relational/trunk@333 014f5005-505e-4b48-8d0a-63407b615a7c --- CHANGELOG | 2 +- relational/parser.py | 4 ++-- relational_gui/about.py | 2 +- relational_readline/linegui.py | 1 + 4 files changed, 5 insertions(+), 4 deletions(-) diff --git a/CHANGELOG b/CHANGELOG index 50bcec5..a0b398b 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -7,7 +7,7 @@ - Can use both PySide and PyQt - Removed buttons for adding and deleting tuples - Can edit relations within the GUI -- Migrating to unicode (instead of strings) +- API migrated to unicode (instead of utf-8 encoded strings) 1.0 - Adds history in the GUI diff --git a/relational/parser.py b/relational/parser.py index a4a1b10..adf5f8c 100644 --- a/relational/parser.py +++ b/relational/parser.py @@ -133,9 +133,9 @@ class node (object): prop =self.prop #Converting parameters - if self.name==PROJECTION:#Projection + if self.name==PROJECTION: prop='\"%s\"' % prop.replace(' ','').replace(',','\",\"') - elif self.name==u"ρ": #Rename + elif self.name==RENAME: prop='{\"%s\"}' % prop.replace(',','\",\"').replace(ARROW,'\":\"').replace(' ','') else: #Selection prop='\"%s\"' % prop diff --git a/relational_gui/about.py b/relational_gui/about.py index 53c93b6..571bf47 100644 --- a/relational_gui/about.py +++ b/relational_gui/about.py @@ -136,7 +136,7 @@ class Ui_Dialog(object): self.label_3.setText(QtGui.QApplication.translate("Dialog", "Version "+version, None, QtGui.QApplication.UnicodeUTF8)) self.label_3.setTextInteractionFlags(QtCore.Qt.LinksAccessibleByMouse|QtCore.Qt.TextSelectableByMouse) self.groupBox_3.setTitle(QtGui.QApplication.translate("Dialog", "Author", None, QtGui.QApplication.UnicodeUTF8)) - self.label_2.setText(QtGui.QApplication.translate("Dialog", "Salvo \"LtWorf\" Tomaselli <tiposchi@tiscali.it>
Emilio Di Prima <emiliodiprima[at]msn[dot]com> (For the windows version)", None, QtGui.QApplication.UnicodeUTF8)) + self.label_2.setText(QtGui.QApplication.translate("Dialog", "Salvo \"LtWorf\" Tomaselli <tiposchi@tiscali.it>
Emilio Di Prima <emiliodiprima[at]msn[dot]com> (For the windows setup)", None, QtGui.QApplication.UnicodeUTF8)) self.label_2.setOpenExternalLinks (True) self.label_2.setTextInteractionFlags(QtCore.Qt.LinksAccessibleByMouse|QtCore.Qt.TextSelectableByMouse) self.groupBox_2.setTitle(QtGui.QApplication.translate("Dialog", "Links", None, QtGui.QApplication.UnicodeUTF8)) diff --git a/relational_readline/linegui.py b/relational_readline/linegui.py index 5e47231..9d9a613 100644 --- a/relational_readline/linegui.py +++ b/relational_readline/linegui.py @@ -265,6 +265,7 @@ def exec_query(command): relname='last_' query=command + query=unicode(query,'utf-8') #Execute query try: pyquery=parser.parse(query)