[Tutor] Calling Modules in ActiveState 2.4

Damien Gouteux damien.gouteux at gmail.com
Thu Sep 22 00:42:34 CEST 2005

For exit:
You need to put an argument (more input) :
import sys
The argument of exit is the return value of your script (0 = okay, other 
= problem).
sys.path is an attribute (of type list) of sys not a function.
So don't put () after path.
I hope it will help.

Bob Nienhuis wrote:

> Working my way through Alan Gauld's tutorial, and I am on the
> section on modules.
> When I call:
> import sys
> sys.exit()
> I get a traceback error saying it needs more input
> Same when I do:
> import sys
> print sys.path()
> Both of these work if I do
> sys.exit
> or print sys.path without the parentheses.
> Is this new behavior in Activstate 2.4, or do I need
> to set an environment variable?
> Bob
>Tutor maillist  -  Tutor at python.org

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.python.org/pipermail/tutor/attachments/20050922/531afb43/attachment-0001.htm

More information about the Tutor mailing list