matteomattei / PySquashfsImage

Python library to read Squashfs image files.
GNU General Public License v3.0
50 stars 20 forks source link

Importing the module fails #7

Closed RoliSoft closed 8 years ago

RoliSoft commented 8 years ago

Hi,

I'm not sure if I'm doing something wrong or not, but I cannot import the module in its current form:

>>> from PySquashfsImage import *
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
AttributeError: module 'PySquashfsImage' has no attribute 'SquashFsImage'
>>> import PySquashfsImage
>>> dir(PySquashfsImage)
['__all__', '__builtins__', '__cached__', '__doc__', '__file__', '__loader__', '__name__', '__package__', '__path__', '__spec__']
>>> PySquashfsImage.__all__
['SquashFsImage', 'SquashedFile', 'SquashInode']
>>> image = SquashFsImage('test.sfs')
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
NameError: name 'SquashFsImage' is not defined

Tested on multiple systems with multiple 3.x versions.

I could only get the module working if I go into the site-packages directory, remove __init__.py and rename PySquashfsImage.py to __init__.py.

probonopd commented 8 years ago

On whatever you do/suggest, please also check 2.7 compatibility.

matteomattei commented 8 years ago

Version 0.6 fixes that issue.