/[ascend]/trunk/pygtk/observer.py
ViewVC logotype

Diff of /trunk/pygtk/observer.py

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1365 by jpye, Tue Mar 20 02:56:58 2007 UTC revision 1366 by jpye, Thu Mar 29 10:02:37 2007 UTC
# Line 121  class ObserverRow: Line 121  class ObserverRow:
121    
122      def get_values(self,table):      def get_values(self,table):
123          if not self.active:          if not self.active:
124              return self.values              vv = []
125                for k,v in table.cols.iteritems():
126                    if k<len(self.values):
127                        vv.append(self.values[k]/v.units.getConversion())
128                return vv
129          else:          else:
130              _v = []              return [col.instance.getRealValue()/col.units.getConversion() \
131              for index,col in table.cols.iteritems():                  for index,col in table.cols.iteritems() \
132                  _v.append( col.instance.getRealValue() )              ]
             return _v  
133    
134  class ObserverTab:  class ObserverTab:
135    
# Line 239  class ObserverTab: Line 242  class ObserverTab:
242      def copy_to_clipboard(self,clip):      def copy_to_clipboard(self,clip):
243          _s = []          _s = []
244          _s.append('\t'.join([_v.title for _k,_v in self.cols.iteritems()]))          _s.append('\t'.join([_v.title for _k,_v in self.cols.iteritems()]))
245            _cf = [_v.units.getConversion() for _k,_v in self.cols.iteritems()]
246          print "COPYING %d ROWS" % len(self.rows)          print "COPYING %d ROWS" % len(self.rows)
247            print "CONVERSIONS:",_cf
248          for _r in self.rows:          for _r in self.rows:
249              _s.append("\t".join([`_v` for _v in _r.get_values(self)]))              _s.append("\t".join([`_v` for _v in _r.get_values(self)]))
250    

Legend:
Removed from v.1365  
changed lines
  Added in v.1366

john.pye@anu.edu.au
ViewVC Help
Powered by ViewVC 1.1.22