1. petsc
  2. PETSc
  3. petsc

Commits

Wenjun Deng  committed c6ba1d3

bin/pythonscripts: updated petsc_conf.py and PetscBinaryIO.py to be compatible with Python 3

  • Participants
  • Parent commits 13b05af
  • Branches master

Comments (0)

Files changed (2)

File bin/pythonscripts/PetscBinaryIO.py

View file
 
         if self.precision == 'longlong':
             nbyte = 16
-            print nbyte
         elif self.precision == 'single':
             nbyte = 4
         else:

File bin/pythonscripts/petsc_conf.py

View file
     petscconfinclude = os.path.join(petscdir, 'include', 'petscconf.h')
 
     try:
-        fid = file(petscvariables, 'r')
+        fid = open(petscvariables, 'r')
     except IOError:
         warnings.warn('Nonexistent or invalid PETSc installation, using defaults')
         return None, None, None
         fid.close()
 
     try:
-        fid = file(petscconfinclude, 'r')
+        fid = open(petscconfinclude, 'r')
     except IOError:
         warnings.warn('Nonexistent or invalid PETSc installation, using defaults')
         return None, None, None