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

alan.gauld@bt.com alan.gauld@bt.com
Fri, 21 Jul 2000 17:16:24 +0100


> >>> import sys
> >>>sys.path.append("d:\python\pyscript")
> 
> then I run the script in IDLE
> 
> >>> import test
> >>> countdown(3)
> Traceback (innermost last):
>   File "<pyshell#4>", line 1, in ?
>     countdown(3)
> NameError: countdown
> 
> what's the deal?


You need to prefix countdown with test:

>>> import test
>>> test.countdown(3)
3
2
1
Blast Off

Alan G.