Hi Vaclav,<div>I was having the same problem, this can fix it.</div><div><br></div><div><div>## make sure we can import from same directory ##</div><div>SCRIPT_DIR = os.path.dirname(os.path.abspath(__file__))</div><div>if SCRIPT_DIR not in sys.path: sys.path.append( SCRIPT_DIR )</div>
<div><br></div><div><br></div><br><div class="gmail_quote">On Fri, Sep 2, 2011 at 3:31 PM, Vaclav Klecanda <span dir="ltr"><<a href="mailto:vencax77@gmail.com">vencax77@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
Hi all,<div>I have faced some problems with relative imports. I have blender 2.59 -> python 3. I have following structure of packages:</div><div><br></div><div>io_export_dxf:</div><div>....model:</div><div>........dxfLibrary.py</div>

<div>........migiusModel.py</div><div><br></div><div>In migiusModel I would like import dxfLibrary:</div>
<div><br></div><div><div>try:</div><div>    import dxfLibrary as DXF</div><div>except Exception:</div><div>    raise Exception("No dxfLibrary.py module")</div></div><div><br></div><div>but I get the exception ...</div>

<div><br></div><div>Maybe I am doing something wrong, because I am new to Python3 but IMHO there are not much changes.</div><div>Another issue: if I use following syntax: except Exception, p: </div><div>when I want to have the excp object I get InvalidSyntaxError.</div>

<div><br></div><div>Does anybody face similar problems? Is there any source related to this in wiki?</div><div><br></div><div>thanks VAsek</div>
<br>_______________________________________________<br>
Bf-python mailing list<br>
<a href="mailto:Bf-python@blender.org">Bf-python@blender.org</a><br>
<a href="http://lists.blender.org/mailman/listinfo/bf-python" target="_blank">http://lists.blender.org/mailman/listinfo/bf-python</a><br>
<br></blockquote></div><br></div>