Fwd: sys module does not contain ps1
Terry Reedy
tjreedy at udel.edu
Fri May 18 14:40:22 EDT 2018
On 5/18/2018 7:40 AM, Alferdize wrote:
> ---------- Forwarded message ----------
> From: Alferdize <simonandrew132 at gmail.com>
> Date: Thu, May 17, 2018 at 10:13 PM
> Subject: sys module does not contain ps1
> To: python-list at python.org
>
>
> It is giving error like I have given below
>>>> import sys
>>>> sys.ps1
> Traceback (most recent call last):
> File "<pyshell#1>", line 1, in <module>
> sys.ps1
> AttributeError: module 'sys' has no attribute 'ps1'
The docs say
"""
sys.ps1
sys.ps2
Strings specifying the primary and secondary prompt of the
interpreter. These are only defined if the interpreter is in interactive
mode.
"""
You must be running your code in a program, perhaps IDLE, that simulates
the interpreter's interactive mode, but which actually runs your code in
a Python interpreter running in non-interactive mode.
--
Terry Jan Reedy
More information about the Python-list
mailing list