tk_config.py 632 Bytes
Newer Older
1 2 3 4
#!/usr/bin/python
# -*- coding: utf-8 -*-
#
"""
5 6 7 8
    Extends util.config.Config with tk_entry field.
    
    Name: tk_config.py
    Author: Alessandro dos Santos Ferreira ( santosferreira.alessandro@gmail.com )
9 10
"""

11
from util.config import Config
12 13

class TkConfig(Config):
14

15
    
16 17
    def __init__(self, label, value, c_type, tk_entry = None, hidden = False, meta = None):
        super(self.__class__, self).__init__(label, value, c_type, hidden, meta)
18 19 20
        self.tk_entry = tk_entry

    def get_entry_val(self):
21 22 23
        if self.tk_entry is not None:
            self.value = self.tk_entry.get()
        return self.get_cast_val()