/[ascend]/trunk/pygtk/ascpy.i
ViewVC logotype

Diff of /trunk/pygtk/ascpy.i

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

revision 1072 by johnpye, Sat Jan 6 14:47:13 2007 UTC revision 1073 by johnpye, Tue Jan 9 01:44:59 2007 UTC
# Line 468  public: Line 468  public:
468                  return str(self.getRealValue()) + ' ' + self.getDimensions().getDefaultUnits().getName().toString()                  return str(self.getRealValue()) + ' ' + self.getDimensions().getDefaultUnits().getName().toString()
469              return _u.getConvertedValue(self.getRealValue())              return _u.getConvertedValue(self.getRealValue())
470    
471            def as(self,units):
472                if not self.isReal():
473                    raise TypeError
474                if units.__class__==str:
475                    units = Units(units);
476                if units.__class__!=Units:
477                    raise TypeError
478                return self.getRealValue() / units.getConversion()
479    
480          def setFixedValue(self,val):          def setFixedValue(self,val):
481              if not self.isFixed():              if not self.isFixed():
482                  self.setFixed();                  self.setFixed();

Legend:
Removed from v.1072  
changed lines
  Added in v.1073

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