ornladios / ADIOS

The old ADIOS 1.x code repository. Look for ADIOS2 for new repo
https://csmd.ornl.gov/adios
Other
54 stars 40 forks source link

python 3 support broken by print statements #199

Open jcwright77 opened 5 years ago

jcwright77 commented 5 years ago

The release notes say adios python interface is compatible since 1.10, but 1.13.1 release has many print statements that don't use parenthesis.

Python 3.6.0 (default, Mar 16 2017, 15:05:11) 
[GCC 4.4.7 20120313 (Red Hat 4.4.7-17)] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import adios
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "XXXXXXXXXXXXXXXX/adios/1.13.1/lib/python/adios.py", line 15
    print 'malformed adios config file, should contain only a single adios-config element'
                                                                                         ^
SyntaxError: Missing parentheses in call to 'print'

Is there something in ./configure to fix this, or does adios not actually support python3?

jychoi-hpc commented 4 years ago

Could you try in other directory? It looks like import statement is trying to load adios.py in the current directory, instead of loading adios.so.

Here is my output:

$ python
Python 3.7.3 (default, Mar 27 2019, 16:54:48) 
[Clang 4.0.1 (tags/RELEASE_401/final)] :: Anaconda, Inc. on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import adios
>>> adios.__file__
'/Users/jyc/anaconda3/lib/python3.7/site-packages/adios/__init__.py'