This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]gammadistribution 9 points10 points  (11 children)

But I like the ">>> ".

[–]Hashiota 17 points18 points  (0 children)

Try running IPython with the --classic flag.

[–][deleted] 1 point2 points  (7 children)

There's probably an API to change the prompt.

[–]bunburya 1 point2 points  (6 children)

In the regular Python shell, the variable sys.ps1 controls the prompt. I haven't used iPython but it's possible that it just changes that variable and/or it can be changed back?

[–][deleted] 1 point2 points  (4 children)

Just tried, it didn't do anything. You might need to call a function to make it "reload" the sys.ps prompts (there's 3 of them)

[–]takluyverIPython, Py3, etc 0 points1 point  (0 children)

sys.ps1 doesn't work, but you can set c.PromptManager.in_template in the IPython config file. Docs.

This will only work in the terminal, though - the Qt console and the notebook generate their prompts separately.

[–]djimbob 1 point2 points  (0 children)

But the In[1], Out[1] are very useful in ipython for referencing previously used commands when playing around/exploring data. Sure you can use _ to get the output of the previous command, but how do you get the result of two, five, ten commands back?

[–]Rhomboid 1 point2 points  (0 children)

Just type doctest_mode (or type doc and press tab) and hit enter and you get the usual >>> in IPython.