<font color="#000000"><br></font><br><div class="gmail_quote">On Thu, Aug 11, 2011 at 8:56 PM, Forafo San <span dir="ltr"><<a href="mailto:ppv.grps@gmail.com">ppv.grps@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
<br>Thank you all for your replies. When I do a<br>
<br>
from Univariate import Univariate<br>
<br>
the TypeError disappears and everything is fine.  Clearly this was an error that a newbie such as myself is likely to make because of little experience with Python. However, this isn't something I'm likely to forget.<br>

<br>
I will also adopt the style recommendations.  Thanks, again.<br>
<div><div></div><div class="h5">--<br>
<a href="http://mail.python.org/mailman/listinfo/python-list" target="_blank">http://mail.python.org/mailman/listinfo/python-list</a><br>
</div></div></blockquote></div><br>As a beginner, I found that it was useful to note how these 2 approaches differ.  In the first approach:<br><br>import Univariate<br>a = Univariate.Univariate(foo)<br><br>what you're doing is loading everything in Univariate in a separate namespace (the Univariate namespace).  The other approach:<br>
<br>from Univariate import Univariate<br>a = Univariate(foo)<br><br>what you're doing is loading *just* Univariate into your top level namespace.  It's important to note this difference because it has potentially critical implications as far as clobbering existing functions that happen to have the same name (if you're loading into your top level namespace with, for instance, "from mymodule import *") versus keeping everything in a separate namespace so stuff doesn't get overwritten.<br>
<br>This is more applicable to scripts/programs you write that import a number of different modules, all of whom may contain objects with the same name.<br><br>All the best,<br>Jason<br clear="all"><br>-- <br>Jason M. Swails<br>
Quantum Theory Project,<br>University of Florida<br>Ph.D. Candidate<br>352-392-4032<br>