Wenjun Deng <[email protected]> writes:

> Dear Sir/Madam,
>
> I found that bin/pythonscripts/PetscBinaryIO.py couldn't be used in
> Python 3 due to usage of print and file() in Python 2 style. I made a
> few changes to make it compatible with Python 3 now. 

Thanks for the patch, though it looks like you didn't actually test with
python3:

$ python3 -c 'from PetscBinaryIO import *; 
PetscBinaryIO().readBinaryFile("/home/jed/petsc/datafiles/matrices/small")'
Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "./PetscBinaryIO.py", line 90, in decorated_f
    result = f(self, *args, **kwargs)
  File "./PetscBinaryIO.py", line 389, in readBinaryFile
    if type(fid) is types.StringType:
AttributeError: 'module' object has no attribute 'StringType'


I have fixed this problem and merged to 'next'.

https://bitbucket.org/petsc/petsc/commits/ce23a07af1cfd62018d2fb9065b2565d8fd1650e

Attachment: pgpTJcXhVQT5d.pgp
Description: PGP signature

Reply via email to