Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

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

share|improve this question
add comment

1 Answer

up vote 2 down vote accepted

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>?

share|improve this answer
    
Ha ha thats awesome I knew it was something like that. Thanks very much, zwets –  lightning Mar 12 '13 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 ;) –  lightning Mar 12 '13 at 16:39
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.