[IPython-dev] Regarding Import for a Package
TARUN GABA
tarun.gaba7 at gmail.com
Thu Jul 25 14:43:22 EDT 2013
Hi,
I am developing a Package under PyDy, for GSoC.
This is my directory structure.
pydy/
--------- __init__.py
---------pydy_viz/
-----------------__init__.py
--------------shapes.py
--------------tests\
-----------__init__.py
-----------test_shapes.py
Now I am trying to import pydy_viz.shapes from inside tests, i.e from
test_shapes.py
I have tried both approaches.
from pydy_viz.shapes import *
Error: No module named pydy_viz.shapes
and relatively ..
from ..shapes import *
Error: tried relative imports from non-package.
but I am not able to import it.
Any ideas what I might be doing wrong.
I dont have a setup.py file in place for now.
Thanks
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/ipython-dev/attachments/20130726/2fd78be5/attachment.html>
More information about the IPython-dev
mailing list