示例#1
0
 def __init__(self, *args, **kw):
   """
   override to call __init__ of python scripts in order to set
   correctly bindings
   """
   XMLObject.__init__(self, *args, **kw)
   ZopePythonScript.__init__(self, *args, **kw)
示例#2
0
 def __init__(self, *args, **kw):
   """
   override to call __init__ of python scripts in order to set
   correctly bindings
   """
   XMLObject.__init__(self, *args, **kw)
   ZopePythonScript.__init__(self, *args, **kw)
示例#3
0
    def __init__(self, filename, _prefix=None, __name__=None):

        # Figure out where the file is
        if _prefix is None: _prefix = SOFTWARE_HOME
        elif type(_prefix) is not type(''):
            _prefix = package_home(_prefix)

        # Come up with a good name...
        if not __name__:
            __name__ = os.path.split(filename)[-1]

        # Default to '.py' extension
        if not os.path.splitext(filename)[1]:
            filename = filename + '.py'
        self.filename = os.path.join(_prefix, filename)

        PythonScript.__init__(self, __name__)

        f = open(self.filename)
        body = f.read()
        f.close()
        self.ZPythonScript_edit('', body)
    def __init__(self, filename, _prefix=None,__name__=None):

        # Figure out where the file is
        if _prefix is None: _prefix=SOFTWARE_HOME
        elif type(_prefix) is not type(''):
            _prefix = package_home(_prefix)

        # Come up with a good name...
        if not __name__:
            __name__=os.path.split(filename)[-1]

        # Default to '.py' extension
        if not os.path.splitext(filename)[1]:
            filename = filename + '.py'
        self.filename = os.path.join(_prefix, filename)

        PythonScript.__init__(self, __name__)
        
        f = open(self.filename)
        body = f.read()
        f.close()
        self.ZPythonScript_edit('', body)
示例#5
0
 def __init__(self, id, **kw):
     ZMIField.__init__(self, id, **kw)
     PythonScript.__init__(self, id)
示例#6
0
 def __init__(self, id, **kw):
     ZMIField.__init__(self, id, **kw)
     PythonScript.__init__(self, id)