~davidc3/onehundredscopes/calculator-raring

« back to all changes in this revision

Viewing changes to src/unity-scope-calculator

  • Committer: David Callé
  • Date: 2013-06-24 21:24:03 UTC
  • Revision ID: davidc@framli.eu-20130624212403-njhoywcekab3jmbm
Switch to gnome-calculator

Show diffs side-by-side

added added

removed removed

Lines of Context:
90
90
 
91
91
                if mode == 1:
92
92
                        print "Operation mode"
93
 
                        operation = 'gcalctool -s \"%s\"' % str(search)
 
93
                        operation = 'gnome-calculator -s \"%s\"' % str(search)
94
94
                        calc_result = Command(operation).run(timeout=1)
95
95
                if mode == 0:
96
96
                        import commands
97
97
                        try:
98
 
                                calc_result=commands.getoutput('gcalctool -s \"%s\"' % str(search))
 
98
                                calc_result=commands.getoutput('gnome-calculator -s \"%s\"' % str(search))
99
99
                                calc_result = calc_result.split('\n')[-1]
100
100
                                calc_result = calc_result.replace(",", ".")
101
101
                                calc_result = round(float(calc_result),4)