lucabaldini / pyxpe

Python utilities for the X-ray Polarimetry Explorers
GNU General Public License v3.0
0 stars 0 forks source link

'file' does not exist in python 3.5 and binio does not work #17

Closed lucabaldini closed 7 years ago

lucabaldini commented 7 years ago

E:\xpe\xpedaq>python Python 3.5.2 (v3.5.2:4def2a2901a5, Jun 25 2016, 22:18:55) [MSC v.1900 64 bit (AMD64)] on win32 Type "help", "copyright", "credits" or "license" for more information.

import pyxpe.recon.binio Traceback (most recent call last): File "", line 1, in File "E:\xpe\pyxpe\pyxpe\recon\binio.py", line 33, in class xpeBinaryFileBase(file): NameError: name 'file' is not defined

csgro commented 7 years ago

The easiest way to fix this is avoid file inheritance and re-implement relevant methods. See commit a560812. tested on linux with python2.7 and win with python3.5 using xpedisplay

lucabaldini commented 7 years ago

Ok, with this fix, the xpeBinaryFileBase class is not an iterator and the next() method must be called explicitely in event loop.

lucabaldini commented 7 years ago

ok, that's was just a wrong return in next closing again