From 56a2a0922aea072005c18f868fc3181a0ad791e5 Mon Sep 17 00:00:00 2001 From: PatrickBeck Date: Sat, 27 Sep 2008 17:10:40 +0000 Subject: [PATCH] Not used code deleted git-svn-id: http://www.neo1973-germany.de/svn@173 46df4e5c-bc4e-4628-a0fc-830ba316316d --- unitc/unit_converter.py | 16 ---------------- 1 file changed, 16 deletions(-) diff --git a/unitc/unit_converter.py b/unitc/unit_converter.py index 9bec26b..142500a 100644 --- a/unitc/unit_converter.py +++ b/unitc/unit_converter.py @@ -151,18 +151,10 @@ class unitconvert(object): else: toref = units.getAttribute('to_ref') -# if self.fromactive == 1: # select the basis for the calculation => when the from field was changed use the data from this field -# number = number_from -# if self.toactive == 1: -# number = number_to - result = eval(toref) # execute the formular in the toref field and safe it to result endresult = eval(fromref) # convert from the refunit to the target unit printresult = str(endresult).replace('.',',') # for the better readability replace the dot with a comma -# if self.fromactive == 1: -# self.toentry_set(printresult) # sets the result into the 'from' field -# else: self.fromentry_set(printresult) # same as above for the 'to' field else: @@ -185,19 +177,11 @@ class unitconvert(object): else: toref = units.getAttribute('to_ref') -# if self.fromactive == 1: # select the basis for the calculation => when the from field was changed use the data from this field -# number = number_from -# if self.toactive == 1: -# number = number_to - result = eval(toref) # execute the formular in the toref field and safe it to result endresult = eval(fromref) # convert from the refunit to the target unit printresult = str(endresult).replace('.',',') # for the better readability replace the dot with a comma -# if self.fromactive == 1: self.toentry_set(printresult) # sets the result into the 'from' field -# else: -# self.fromentry_set(printresult) # same as above for the 'to' field def clear(self, widget): # clears the entry fields self.fromentry.set_text('')