Exemple #1
0
    def __init__(self, name, default=None, meta=None, validator=None):
        if default is None:
            default = default_record

        Property.__init__(self, name, "geometer-record", default, meta,
                          validator)
        return
 def __init__(self, name, default=None, meta=None, validator=None):
     if default is None:
         import sys
         default = sys.stdin
         
     Property.__init__(self, name, "file", default, meta, validator)
     return
Exemple #3
0
    def __init__(self, name, default=0.0, meta=None, validator=None):
        Property.__init__(self, name, "dimensional", default, meta, validator)

        try:
            self.len = len(default)
        except TypeError:
            self.len = 0

        return
Exemple #4
0
    def __init__(self, name, default=[], converter=None, meta=None, validator=None):
        Property.__init__(self, name, "array", default, meta, validator)

        if converter is None:
            converter = float

        self.converter = converter
        
        return
Exemple #5
0
    def __init__(self, name, default=0.0, meta=None, validator=None):
        Property.__init__(self, name, "dimensional", default, meta, validator)

        try:
            self.len = len(default)
        except TypeError:
            self.len = 0
            
        return
Exemple #6
0
    def __init__(self, name, mode="w", default=None, meta=None, validator=None):
        if default is None:
            import sys
            default = sys.stdout
            
        Property.__init__(self, name, "file", default, meta, validator)

        self.mode = mode

        return
Exemple #7
0
    def __init__(self,
                 name,
                 default=[],
                 converter=None,
                 meta=None,
                 validator=None):
        Property.__init__(self, name, "array", default, meta, validator)

        if converter is None:
            converter = float

        self.converter = converter

        return
Exemple #8
0
    def __init__(self,
                 name,
                 mode="w",
                 default=None,
                 meta=None,
                 validator=None):
        if default is None:
            import sys
            default = sys.stdout

        Property.__init__(self, name, "file", default, meta, validator)

        self.mode = mode

        return
Exemple #9
0
 def __init__(self, name, default=0, meta=None, validator=None):
     Property.__init__(self, name, "int", default, meta, validator)
     return
Exemple #10
0
 def __init__(self, name, default=[], meta=None, validator=None):
     Property.__init__(self, name, "slice", default, meta, validator)
     return
Exemple #11
0
 def __init__(self, name, default=None, meta=None, validator=None):
     if default is None:
         default = list()
     Property.__init__(self, name, "list", default, meta, validator)
     return
Exemple #12
0
 def __init__(self, name, default=0, meta=None, validator=None):
     Property.__init__(self, name, "int", default, meta, validator)
     return
Exemple #13
0
 def __init__(self, name, default=None, meta=None, validator=None):
     if default is None:
         default = default_record
         
     Property.__init__(self, name, "geometer-record", default, meta, validator)
     return
Exemple #14
0
 def __init__(self, name, default=sys.stdout, meta=None, validator=None):
     Property.__init__(self, name, "file", default, meta, validator)
     return
Exemple #15
0
 def __init__(self, name, default=[], meta=None, validator=None):
     Property.__init__(self, name, "slice", default, meta, validator)
     return
Exemple #16
0
 def __init__(self, name, default=sys.stdout, meta=None, validator=None):
     Property.__init__(self, name, "file", default, meta, validator)
     return
Exemple #17
0
 def __init__(self, name, default=False, meta=None, validator=None):
     Property.__init__(self, name, "bool", default, meta, validator)
     return
Exemple #18
0
 def __init__(self, name, default=False, meta=None, validator=None):
     Property.__init__(self, name, "bool", default, meta, validator)
     return
Exemple #19
0
 def __init__(self, name, default=None, meta=None, validator=None):
     if default is None:
         default = []
     Property.__init__(self, name, "list", default, meta, validator)
     return
Exemple #20
0
 def __init__(self, name, default=None, meta=None, validator=None):
     import datetime
     base.__init__(self, name, "timestamp", datetime.datetime.now(), meta)
Exemple #21
0
 def __init__(self, name, default=None, meta=None, validator=None):
     import time
     base.__init__(self, name, "date", time.ctime(), meta)