Thanks, I read it and try to put my code in the correct form, but now give me another error, inside the Writer Package says:<br>"ValueError: Attempted relative import in non-package", if somebody knows a clue of how fix it i will glad to read opinions. <img goomoji="gtalk.330" style="margin: 0pt 0.2ex; vertical-align: middle;" src="cid:gtalk.330@goomoji.gmail"><br>
<br><div class="gmail_quote">On Thu, Feb 4, 2010 at 2:11 AM, Gabriel Genellina <span dir="ltr"><<a href="mailto:gagsl-py2@yahoo.com.ar">gagsl-py2@yahoo.com.ar</a>></span> wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
En Thu, 04 Feb 2010 01:00:56 -0300, Hidura <<a href="mailto:hidura@gmail.com" target="_blank">hidura@gmail.com</a>> escribió:<div><div></div><div class="h5"><br>
<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
Good evening list, I have a really big trouble with the imports in the 3.1<br>
version(Notes: In the older 2.64 theres no problems), I have two packages,<br>
the first package Utilities who contains Writer the second package, Writers<br>
contain the module tagmanip(What is imported in the best way inside the<br>
__init__.py of the Writer), when i make the import inside the writer<br>
everything is ok, but from the Utilities package the errors says:<br>
"ImportError: No module named tagsmanip".<br>
I don't understand why this is happening, if somebody could help me i will<br>
glad to hear any suggestion.<br>
</blockquote>
<br></div></div>
In Python 3.x, "absolute" import is enabled by default (2.6 uses a mix of relative and absolute imports).<br>
To import sibling modules in a package, or modules in a subpackage, you have to use relative imports:<br>
<br>
from . import tagmanip<br>
from .Writers import tagmanip<br>
<br>
See PEP328 <a href="http://www.python.org/dev/peps/pep-0328/" target="_blank">http://www.python.org/dev/peps/pep-0328/</a><br>
<br>
-- <br>
Gabriel Genellina<br><font color="#888888">
<br>
-- <br>
<a href="http://mail.python.org/mailman/listinfo/python-list" target="_blank">http://mail.python.org/mailman/listinfo/python-list</a><br>
</font></blockquote></div><br><br clear="all"><br>-- <br>Hidura<br>