Package screenlets :: Package plugins :: Module Convert :: Class Converter
[hide private]
[frames] | no frames]

Class Converter

source code

object --+
         |
        Converter
Known Subclasses:

The base class for the converters. The converters look after maintaining the list of currently shown values - initialising, accepting keyboard input, etc..

Instance Methods [hide private]
 
__init__(self)
x.__init__(...) initializes x; see help(type(x)) for signature
source code
 
on_key_press(self, key)
If accepted, appends the pressed key to the value in the currently active field.
source code
 
str(self, val) source code
 
neaten_input(self)
Replaces an empty value with '0' and again removes leading '0' in a non-empty string.
source code
 
filter_key(self, key)
Decides whether to accept pressed key.
source code
 
convert(self)
Recalculates field values after changes.
source code

Inherited from object: __delattr__, __format__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __repr__, __setattr__, __sizeof__, __str__, __subclasshook__

Class Variables [hide private]
  __name__ = 'Converter'
  __title__ = 'Base'
  num_fields = 0
  field_names = []
  active_field = 0
  values = []
  replace = True
Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

__init__(self)
(Constructor)

source code 

x.__init__(...) initializes x; see help(type(x)) for signature

Overrides: object.__init__
(inherited documentation)