@@ -479,9 +479,7 @@ def __init__(self, completekey='tab', stdin=None, stdout=None, use_ipython=False
479479 self .initial_stdout = sys .stdout
480480 self .history = History ()
481481 self .pystate = {}
482- # noinspection PyUnresolvedReferences
483- self .keywords = self .reserved_words + [fname [3 :] for fname in dir (self )
484- if fname .startswith ('do_' )]
482+ self .keywords = self .reserved_words + [fname [3 :] for fname in dir (self ) if fname .startswith ('do_' )]
485483 self .parser_manager = ParserManager (redirector = self .redirector , terminators = self .terminators ,
486484 multilineCommands = self .multilineCommands ,
487485 legalChars = self .legalChars , commentGrammars = self .commentGrammars ,
@@ -1138,12 +1136,12 @@ def do_pause(self, text):
11381136 Usage: pause [text]"""
11391137 sm .input (text + '\n ' )
11401138
1141- # noinspection PyMethodMayBeStatic
11421139 def do_shell (self , command ):
11431140 """Execute a command as if at the OS prompt.
11441141
11451142 Usage: shell <command> [arguments]"""
1146- os .system (command )
1143+ proc = subprocess .Popen (command , stdout = self .stdout , stderr = sys .stderr , shell = True )
1144+ proc .communicate ()
11471145
11481146 def path_complete (self , text , line , begidx , endidx , dir_exe_only = False , dir_only = False ):
11491147 """Method called to complete an input line by local file system path completion.
0 commit comments