<div>Quick introduction,  I&#39;m Joseph Fennell, and I&#39;ve been playing with python for the past 6 years (primarily in the interpreter) and have finally gotten started on a full project and I&#39;ve run into a small problem.  I have defined some modules, and when I import them into the page I want to use them on after I run the program it tells me the variable I&#39;m trying to pass through them is not defined.</div>

<div> </div>
<div>I assume that it&#39;s because the variable is considered local and the imported functions are not technically local to that document.</div>
<div> </div>
<div>The code is to pass the contents of a database through to filter by name and quantity and as follows</div>
<div> </div>
<div>=================================================</div>
<div> </div>
<div>cHandler.execute(&quot;SELECT * FROM table&quot;)</div>
<div> </div>
<div>#sets results from above to nl</div>
<div> </div>
<div>nl = cHandler.fetchall()</div>
<div> </div>
<div>dn = raw_input(&quot;User input: &quot;)</div>
<div> </div>
<div>nl2 = []</div>
<div> </div>
<div>dname()<br>########</div>
<div>def dname():</div>
<div>    global nl</div>
<div>    for ndc in nl:</div>
<div>        if ndc[1] == dn:</div>
<div>            nl2.append(ndc,)</div>
<div>        else:</div>
<div>            continue</div>
<div>#########</div>
<div>tuple(nl2) = nl2</div>
<div> </div>
<div>qtysrch()</div>
<div>#########</div>
<div>def qtysrch():</div>
<div>    global nl2</div>
<div>    for ndc in nl2:</div>
<div>        if ndc[7] == 0:</div>
<div>            continue</div>
<div>        else:</div>
<div>            print ndc</div>
<div> </div>
<div> </div>
<div>Any help I can get with this problem would be greatly appreciated.</div>
<div> </div>
<div> </div>
<div>Thanks</div>
<div> </div>
<div> </div>
<div> </div>
<div>Joseph L. Fennell</div>