##// END OF EJS Templates
Fix for starting the Qt console
Thomas Kluyver -
Show More
@@ -516,23 +516,31 b' class IPythonInputSplitter(InputSplitter):'
516 self._buffer_raw = []
516 self._buffer_raw = []
517 self._validate = True
517 self._validate = True
518
518
519 self.physical_line_transforms = physical_line_transforms or \
519 if physical_line_transforms is not None:
520 [leading_indent(),
520 self.physical_line_transforms = physical_line_transforms
521 classic_prompt(),
521 else:
522 ipy_prompt(),
522 self.physical_line_transforms = [leading_indent(),
523 ]
523 classic_prompt(),
524 ipy_prompt(),
525 ]
524
526
525 self.assemble_logical_lines = assemble_logical_lines()
527 self.assemble_logical_lines = assemble_logical_lines()
526 self.logical_line_transforms = logical_line_transforms or \
528 if logical_line_transforms is not None:
527 [cellmagic(),
529 self.logical_line_transforms = logical_line_transforms
528 help_end(),
530 else:
529 escaped_commands(),
531 self.logical_line_transforms = [cellmagic(),
530 assign_from_magic(),
532 help_end(),
531 assign_from_system(),
533 escaped_commands(),
532 ]
534 assign_from_magic(),
535 assign_from_system(),
536 ]
533
537
534 self.assemble_python_lines = assemble_python_lines()
538 self.assemble_python_lines = assemble_python_lines()
535 self.python_line_transforms = python_line_transforms or []
539 if python_line_transforms is not None:
540 self.python_line_transforms = python_line_transforms
541 else:
542 # We don't use any of these at present
543 self.python_line_transforms = []
536
544
537 @property
545 @property
538 def transforms(self):
546 def transforms(self):
@@ -114,7 +114,10 b' class FrontendWidget(HistoryConsoleWidget, BaseFrontendMixin):'
114 exit_requested = QtCore.Signal(object)
114 exit_requested = QtCore.Signal(object)
115
115
116 # Protected class variables.
116 # Protected class variables.
117 _prompt_transformer = IPythonInputSplitter(transforms=[classic_prompt()])
117 _prompt_transformer = IPythonInputSplitter(physical_line_transforms=[classic_prompt()],
118 logical_line_transforms=[],
119 python_line_transforms=[],
120 )
118 _CallTipRequest = namedtuple('_CallTipRequest', ['id', 'pos'])
121 _CallTipRequest = namedtuple('_CallTipRequest', ['id', 'pos'])
119 _CompletionRequest = namedtuple('_CompletionRequest', ['id', 'pos'])
122 _CompletionRequest = namedtuple('_CompletionRequest', ['id', 'pos'])
120 _ExecutionRequest = namedtuple('_ExecutionRequest', ['id', 'kind'])
123 _ExecutionRequest = namedtuple('_ExecutionRequest', ['id', 'kind'])
@@ -98,7 +98,10 b' class IPythonWidget(FrontendWidget):'
98
98
99 # FrontendWidget protected class variables.
99 # FrontendWidget protected class variables.
100 _input_splitter_class = IPythonInputSplitter
100 _input_splitter_class = IPythonInputSplitter
101 _prompt_transformer = IPythonInputSplitter(transforms=[ipy_prompt()])
101 _prompt_transformer = IPythonInputSplitter(physical_line_transforms=[ipy_prompt()],
102 logical_line_transforms=[],
103 python_line_transforms=[],
104 )
102
105
103 # IPythonWidget protected class variables.
106 # IPythonWidget protected class variables.
104 _PromptBlock = namedtuple('_PromptBlock', ['block', 'length', 'number'])
107 _PromptBlock = namedtuple('_PromptBlock', ['block', 'length', 'number'])
General Comments 0
You need to be logged in to leave comments. Login now