Im using python in the terminal and I switched from >>> to C> doing a demo. the problem being is Im not told how to switch from 'C>' back to '>>>'. I dont want to just close the terminal and 'kill' the process entirely. Im new and I hope someone gets a chuckle out of this but can maybe please help me out. thanks :D
1 Answer
Python's interpreter prompt is the value of the system variable sys.ps1
. So, to set it to >>>, do:
import sys
sys.ps1 = '>>> '
Just out of curiosity, how did you set it to C>?
-
Ha ha thats awesome I knew it was something like that. Thanks very much, zwets Mar 12, 2013 at 5:38
-
the exact opposite of what was described; sys.ps1 = 'C>' . I thought it was the neatest thing until I had to switch it back. I had a feelling it was something like that change it back but I thought that since it was initially assigned to be C> then that is what it was named and maybe couldnt be changed back.. wrong but in a good way for once ;) Mar 12, 2013 at 16:39