Skip to content

Commit

Permalink
Merge pull request ipython#1717 from bfroehle/_123_sys_ps1
Browse files Browse the repository at this point in the history
Define generic sys.ps{1,2,3}, for use by scripts.

Closes ipython#123.
  • Loading branch information
fperez committed May 10, 2012
2 parents 6cbe507 + 5eb03bf commit ea9c293
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions IPython/core/interactiveshell.py
Expand Up @@ -637,6 +637,11 @@ def init_io(self):
def init_prompts(self):
self.prompt_manager = PromptManager(shell=self, config=self.config)
self.configurables.append(self.prompt_manager)
# Set system prompts, so that scripts can decide if they are running
# interactively.
sys.ps1 = 'In : '
sys.ps2 = '...: '
sys.ps3 = 'Out: '

def init_display_formatter(self):
self.display_formatter = DisplayFormatter(config=self.config)
Expand Down

0 comments on commit ea9c293

Please sign in to comment.