Empty __init__.py
: Need from ccx2paraview import ccx2paraview
instead of import ccx2paraview
#31
Labels
bug
Something isn't working
Problem description
When installing
ccx2paraview
under Ubuntu 22.04 using pip likepip will create a file
~/.local/lib/python3.10/site-packages/ccx2paraview/__init__.py
that turnsccx2paraview
into a Python module.The
__init__.py
is empty, and therefore the moduleccx2paraview
-- when importing in a Python file -- has no members except again the submoduleccx2paraview
(because the folder~/.local/lib/python3.10/site-packages/ccx2paraview
contains the fileccx2paraview.py
).Hence, in order to access the module elements from
ccx2paraview
one has to statefrom ccx2paraview import ccx2paraview
and then all elements are again available like e.g.ccx2paraview.Converter
Desired behavior
After
import ccx2paraview
in a Python file have the relevant members ofccx2paraview
available likeccx2paraview.Converter
etc.Potential fix
Include a file
__init__.py
into theccx2paraview
repository with content liketo import everything from the
ccx2paraview.py
orI modified the empty
__init__.py
like this and it worked.The text was updated successfully, but these errors were encountered: