Exemple #1
0
    def update(self, code):
        if code == CFD_Saturne:
            from code_saturne.cs_package import package
        if code == CFD_Neptune:
            from neptune_cfd.nc_package import package

        pkg = package()
        self.labelVersionValue.setText(pkg.version)
        self.labelPrefixValue.setText(pkg.get_dir('prefix'))
        self.labelCodeValue.setText(pkg.name)
Exemple #2
0
    def setCode(self, env_saturne, env_neptune):
        if env_neptune:
            code = CFD_Neptune
            from neptune_cfd.nc_package import package

        elif env_saturne:
            code = CFD_Saturne
            from code_saturne.cs_package import package

        else:
            raise ValueError("Invalid CFD_Code in InfoDialog class")

        pkg = package()
        self.labelVersionValue.setText(pkg.version)
        self.labelPrefixValue.setText(pkg.get_dir('prefix'))
        self.labelCodeValue.setText(pkg.name)
        _SetCFDCode(code)