Accidentally hit post by mistake before msg completed.<div><br></div><div>Any comments appreciated.  It's a very simple scenario, but not sure what the mistake is.</div><div><br></div><div>Thanks</div><div><br></div><div>
Jason</div><div><br></div><div><br><div class="gmail_quote">On Tue, Feb 28, 2012 at 6:55 PM, Jason Veldicott <span dir="ltr"><<a href="mailto:jasonveldicott@gmail.com">jasonveldicott@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div>Hi,</div><div><br></div><div>I have a simple configuration of modules as beneath, but an import error is reported:</div>
<div><br></div><div>/engine  </div><div>   (__init__ is empty here)</div><div>   engine.py</div><div>
/sim</div><div>   __init__.py</div><div>   </div><div><br></div><div>The module engine.py imports a variable instantiated in sim.__init__ as follows:</div><div> </div><div>   from sim import var_name</div><div>   var_name.func()</div>

<div> </div><div>The following error messaged is received on the func() call above (Eclipse PyDev):</div><div><br></div><div>"undefined variable from import: func"</div><div> </div><div>Any idea why this is causing an error?</div>

</blockquote></div><br></div>