question

yipusi ypaami at gmail.com
Sun Jul 3 11:10:21 CEST 2005


IDLE 1.0.3      
>>> import sys
>>> sys.ps2

Traceback (most recent call last):
  File "<pyshell#1>", line 1, in -toplevel-
    sys.ps2
AttributeError: 'module' object has no attribute 'ps2'
>>> 

where is the problem?

---------- Forwarded message ----------
From: Steven D'Aprano <steve at REMOVETHIScyber.com.au>
To: python-list at python.org
Date: Sun, 03 Jul 2005 18:51:07 +1000
Subject: Re: a question
On Sun, 03 Jul 2005 03:19:45 -0400, Xinyue Ye wrote:

> when I type sys.ps2 after import sys,
> I got the message like:
> Traceback (most recent call last):
>  File "<pyshell#10>", line 1, in -toplevel-
>   sys.ps2
> AttributeError: 'module' object has no attribute 'ps2'
> why does it happen?

It works for me.

>>> import sys
>>> sys.ps2
'... '

Can you cut and past the relevant lines from your interactive session?



--
Steven.



More information about the Python-list mailing list