[Tutor] I think I'm getting ahead of myself

Ben Beuchler insyte@emt-p.org
Thu, 20 Jul 2000 18:56:43 -0500


On Thu, Jul 20, 2000 at 07:31:03PM -0400, Steven Gilmore wrote:

> >>> import test
> >>> countdown(3)
> Traceback (innermost last):
>   File "<pyshell#4>", line 1, in ?
>     countdown(3)
> NameError: countdown
> 
> what's the deal?

Since you imported it as part of a module, you need to specify the
module thusly:

test.countdown(3)

Or import it like so:

from test import countdown

Then you would be able to call countdown directly:

countdown(3)



Ben

-- 
Ben Beuchler                                         insyte@bitstream.net
MAILER-DAEMON                                         (612)-321-9290 x101
Bitstream Underground                                   www.bitstream.net