I have some difficulties with python module/package usage in my code. The code is here: https://github.com/cjlano/svg
.
└── svg
├── geometry.py
├── __init__.py
├── LICENSE
├── README.md
├── svg.py
├── svg.test.py
└── tests
└── [...]
In the module svg I need to use the module geometry. As this module did not exist in the beginning when all the code was in svg.py, I decided to import the entire geometry namespace into svg (from geometry import *).
My issue is that, when I import the svg module from my package, it works well in python2 but fails in python3:
Python 2.7.5 (default, Sep 6 2013, 09:59:46)
[GCC 4.8.1 20130725 (prerelease)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> from svg import svg
>>> help(svg)
Gives me access to the svg module documentation. Whereas
Python 3.3.2 (default, Sep 6 2013, 09:35:59)
[GCC 4.8.1 20130725 (prerelease)] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> from svg import svg
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "./svg/svg.py", line 27, in <module>
from geometry import *
ImportError: No module named 'geometry'
Gives an error on import.
Any ideas on how to write my code to be usable in python3?
Thanks!