For copy and paste purposes, I wish to hide the >>>
and ...
Python prompts whenever I am in the interactive shell console. I have achieved this effect successfully with the command import sys
, then sys.ps1 = ""
(source). However that only hides >>>
. Furthermore, a flag would simplify the work, and since other languages have this type of flag, I wonder if I'm not reinventing the wheel.
In database programming with Db2, for example, there is a +p flag. As it is described negatively, it does the opposite of -p:
The -p option tells the command line processor to display the command line processor prompt when the user is in interactive mode.
Any shortcuts?