Skip to content

Commit

Permalink
use system_raw in terminal, even on Windows
Browse files Browse the repository at this point in the history
`system_raw` uses `os.system` instead of `utils.process.system`, and makes
more sense in a Terminal session.

There was discussion that it should be otherwise on Windows, but I can't
find any actual evidence for why this would be the case, and there are very
clear disadvantages to not using `os.system` (see ipython#978 and ipython#181).

closes ipythongh-978
  • Loading branch information
minrk committed Nov 9, 2011
1 parent 6064c15 commit f8d8e69
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions IPython/frontend/terminal/interactiveshell.py
Expand Up @@ -112,11 +112,9 @@ def __init__(self, config=None, ipython_dir=None, profile_dir=None, user_ns=None
config=config, profile_dir=profile_dir, user_ns=user_ns,
user_global_ns=user_global_ns, custom_exceptions=custom_exceptions
)
# use os.system instead of utils.process.system by default, except on Windows
if os.name == 'nt':
self.system = self.system_piped
else:
self.system = self.system_raw
# use os.system instead of utils.process.system by default,
# because piped system doesn't make sense in the Terminal:
self.system = self.system_raw

self.init_term_title()
self.init_usage(usage)
Expand Down

0 comments on commit f8d8e69

Please sign in to comment.