예제 #1
0
 def run(self):
     """
     Setup user interface and start QT
     """
     app=QtGui.QApplication(self.parser.getArgs())
     app.setApplicationName(path.basename(sys.argv[0]))
     try:
         app.setApplicationVersion(PyFoam.versionString())
     except AttributeError:
         # Old PyQt
         pass    
     app.setOrganizationName("PyFoam")
     self.setupGUI()
     
     sys.exit(app.exec_())
예제 #2
0
    def run(self):
        """
        Setup user interface and start QT
        """
        app = QtGui.QApplication(self.parser.getArgs())
        app.setApplicationName(path.basename(sys.argv[0]))
        try:
            app.setApplicationVersion(PyFoam.versionString())
        except AttributeError:
            # Old PyQt
            pass
        app.setOrganizationName("PyFoam")
        self.setupGUI()

        sys.exit(app.exec_())
예제 #3
0
except KeyError:
    print "not set"

try:
    import PyFoam
    import PyFoam.FoamInformation
except ImportError:
    print "PyFoam not in PYTHONPATH. Don't see no sense in continuing"
    sys.exit(-1)
    
print
print "OpenFOAM", PyFoam.FoamInformation.foamVersion(),"of the installed versions",PyFoam.FoamInformation.foamInstalledVersions()
if PyFoam.FoamInformation.oldAppConvention():
    print "  This version of OpenFOAM uses the old calling convention"
print
print "pyFoam-Version:",PyFoam.versionString()
print
print "Configuration search path:",PyFoam.configuration().configSearchPath()
print "Configuration files (used):",PyFoam.configuration().configFiles()

def testLibrary(name,textMissing=None):
    print "%-20s : " % name,

    try:
        exec("import "+name)
        print "Yes",
        version=None
        try:
            version=eval(name+".__version__")
        except AttributeError:
            pass
예제 #4
0
installedKeys=list(installed.keys())
installedKeys.sort()

try:
    formatString="%%%ds : %%s" % max([1+len(a[0])+len(a[1]) for a in installedKeys])
except ValueError:
    # max failing because list is empty
    formatString="%s : %s"

for k in installedKeys:
    print_(formatString % (k[0]+"-"+k[1],installed[k]))

if PyFoam.FoamInformation.oldAppConvention():
    print_("  This version of OpenFOAM uses the old calling convention")
print_()
print_("pyFoam-Version:",PyFoam.versionString())
# hardcodedVersion=(0,6,7,"development") # Change in PyFoam/__init__.py as well
hardcodedVersion=(0,6,6)
if PyFoam.version()!=hardcodedVersion:
    print_("ALERT: Reported version",PyFoam.version(),
           "is different from hardcoded version",
            hardcodedVersion,"-> probably inconsistent library installation")
print_()
print_("Path where PyFoam was found (PyFoam.__path__) is",PyFoam.__path__)
print_()
print_("Configuration search path:",PyFoam.configuration().configSearchPath())
print_("Configuration files (used):",PyFoam.configuration().configFiles())

libLoc={}

def testLibrary(name,
예제 #5
0
installed=PyFoam.FoamInformation.foamInstalledVersions()

print_("Version", PyFoam.FoamInformation.foamVersion(),
       "Fork",PyFoam.FoamInformation.foamFork(),
       "of the installed",len(installed),"versions:")
installedKeys=list(installed.keys())
installedKeys.sort()

formatString="%%%ds : %%s" % max([1+len(a[0])+len(a[1]) for a in installedKeys])
for k in installedKeys:
    print_(formatString % (k[0]+"-"+k[1],installed[k]))

if PyFoam.FoamInformation.oldAppConvention():
    print_("  This version of OpenFOAM uses the old calling convention")
print_()
print_("pyFoam-Version:",PyFoam.versionString())
# hardcodedVersion=(0,6,4,"development")
hardcodedVersion=(0,6,4)
if PyFoam.version()!=hardcodedVersion:
    print_("ALERT: Reported version",PyFoam.version(),
           "is different from hardcoded version",
            hardcodedVersion,"-> probably inconsistent library installation")
print_()
print_("Path where PyFoam was found (PyFoam.__path__) is",PyFoam.__path__)
print_()
print_("Configuration search path:",PyFoam.configuration().configSearchPath())
print_("Configuration files (used):",PyFoam.configuration().configFiles())

libLoc={}

def testLibrary(name,