From 24b916131f1377e92ba1410ead50a2289075e075 Mon Sep 17 00:00:00 2001 From: LtWorf Date: Mon, 21 Jun 2010 14:20:09 +0000 Subject: [PATCH] - Fixed wrong behaviour that didn't recognise assignment properly git-svn-id: http://galileo.dmi.unict.it/svn/relational/trunk@230 014f5005-505e-4b48-8d0a-63407b615a7c --- relational_readline/linegui.py | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/relational_readline/linegui.py b/relational_readline/linegui.py index d9fd2a1..1c67563 100644 --- a/relational_readline/linegui.py +++ b/relational_readline/linegui.py @@ -123,6 +123,7 @@ def exec_line(command): exec_query( command) def replacements(query): + '''This funcion replaces ascii easy operators with the correct ones''' query=query.replace( '_PRODUCT' , '*') query=query.replace( '_UNION' , 'ᑌ') query=query.replace( '_INTERSECTION' , 'ᑎ') @@ -140,8 +141,10 @@ def replacements(query): def exec_query(command): '''This function executes a query and prints the result on the screen''' - #Finds the name in where to save the query + #Performs replacements for weird operators + command=replacements(command) + #Finds the name in where to save the query parts=command.split('=',1) if len(parts)>1: @@ -160,9 +163,6 @@ def exec_query(command): relname='last_' query=command - #Performs replacements for weird operators - query=replacements(query) - #Execute query try: pyquery=parser.parse(query) @@ -176,7 +176,6 @@ def exec_query(command): except Exception, e: print e - def main(files=[]): readline.set_completer(completer.complete)