[Tutor] What is the Python Path in windows 98?
Remco Gerlich
scarblac@pino.selwerd.nl
Wed, 14 Nov 2001 20:24:53 +0100
On 0, crapaudada <crapaudada@ifrance.com> wrote:
> I thank you and Mr Perry,
>
> Just a last question:
> "sys.path" does work exactly as you say, and I will work again on the sys
> module; but "sys.path()" returns an error message, that I don't understand
> well. It says:
> "Traceback (most recent call last):
> File "<pyshell#2>", line 1, in ?
> sys.path()
> TypeError: object of type 'list' is not callable"
>
> Is it a misconfiguration of my system?
>
> If not, I don't see why I shouldn't call a list object from the interactive
> prompt. What causes it to fail?
sys.path is a list.
sys.path() tries to call the list.
That fails, since lists aren't callable. Functions and classes are callable,
as well as a few more obscure things.
Calling something runs some code, like the function you are calling. Calling
a class makes a new instance of that class. Calling a list doesn't make sense.
What are you trying to do?
--
Remco Gerlich