How can I prevent a name error error in python?
<p>When I run my program core.py (<a href="http://pastebin.com/kbzbBUYd" rel="nofollow">http://pastebin.com/kbzbBUYd</a>) it returns:</p>

<p>File "core.py", line 47, in texto
    core.mail(numbersendlist, messagetext)
NameError: global name 'core' is not defined</p>

<p>Can anyone tell me what is going on and how I can stop this error?</p>

<p>If it helps, the "import carrier" line in core.py refers to carrier.py (<a href="http://pastebin.com/zP2RHbnr" rel="nofollow">http://pastebin.com/zP2RHbnr</a>)</p>
