Show More
@@ -166,18 +166,18 b' def main():' | |||||
166 | wgroup.add_argument('--paging', type=str, default='inside', |
|
166 | wgroup.add_argument('--paging', type=str, default='inside', | |
167 | choices = ['inside', 'hsplit', 'vsplit', 'none'], |
|
167 | choices = ['inside', 'hsplit', 'vsplit', 'none'], | |
168 | help='set the paging style [default inside]') |
|
168 | help='set the paging style [default inside]') | |
169 |
wgroup.add_argument('-- |
|
169 | wgroup.add_argument('--plain', action='store_true', | |
170 |
help=' |
|
170 | help='disable rich text support') | |
171 | wgroup.add_argument('--gui-completion', action='store_true', |
|
171 | wgroup.add_argument('--gui-completion', action='store_true', | |
172 | help='use a GUI widget for tab completion') |
|
172 | help='use a GUI widget for tab completion') | |
173 | wgroup.add_argument('--style', type=str, |
|
173 | wgroup.add_argument('--style', type=str, | |
174 | choices = list(get_all_styles()), |
|
174 | choices = list(get_all_styles()), | |
175 |
help='specify a pygments style for by name |
|
175 | help='specify a pygments style for by name') | |
176 | wgroup.add_argument('--stylesheet', type=str, |
|
176 | wgroup.add_argument('--stylesheet', type=str, | |
177 |
help= |
|
177 | help='path to a custom CSS stylesheet') | |
178 | wgroup.add_argument('--colors', type=str, |
|
178 | wgroup.add_argument('--colors', type=str, help = \ | |
179 |
|
|
179 | "Set the color scheme (LightBG,Linux,NoColor). This is guessed \ | |
180 |
|
|
180 | based on the pygments style if not set.") | |
181 |
|
181 | |||
182 | args = parser.parse_args() |
|
182 | args = parser.parse_args() | |
183 |
|
183 | |||
@@ -224,20 +224,22 b' def main():' | |||||
224 | kernel_manager.start_kernel(**kwargs) |
|
224 | kernel_manager.start_kernel(**kwargs) | |
225 | kernel_manager.start_channels() |
|
225 | kernel_manager.start_channels() | |
226 |
|
226 | |||
227 | local_kernel = (not args.existing) or args.ip in LOCAL_IPS |
|
|||
228 | # Create the widget. |
|
227 | # Create the widget. | |
229 | app = QtGui.QApplication([]) |
|
228 | app = QtGui.QApplication([]) | |
|
229 | local_kernel = (not args.existing) or args.ip in LOCAL_IPS | |||
230 | if args.pure: |
|
230 | if args.pure: | |
231 |
kind = ' |
|
231 | kind = 'plain' if args.plain else 'rich' | |
232 |
widget = FrontendWidget(kind=kind, paging=args.paging, |
|
232 | widget = FrontendWidget(kind=kind, paging=args.paging, | |
233 | elif args.rich or args.pylab: |
|
233 | local_kernel=local_kernel) | |
234 | widget = RichIPythonWidget(paging=args.paging, local_kernel=local_kernel) |
|
234 | elif args.plain: | |
235 | else: |
|
|||
236 | widget = IPythonWidget(paging=args.paging, local_kernel=local_kernel) |
|
235 | widget = IPythonWidget(paging=args.paging, local_kernel=local_kernel) | |
|
236 | else: | |||
|
237 | widget = RichIPythonWidget(paging=args.paging, | |||
|
238 | local_kernel=local_kernel) | |||
237 | widget.gui_completion = args.gui_completion |
|
239 | widget.gui_completion = args.gui_completion | |
238 | widget.kernel_manager = kernel_manager |
|
240 | widget.kernel_manager = kernel_manager | |
239 |
|
241 | |||
240 |
# |
|
242 | # Configure the style. | |
241 | if not args.pure: # only IPythonWidget supports styles |
|
243 | if not args.pure: # only IPythonWidget supports styles | |
242 | if args.style: |
|
244 | if args.style: | |
243 | widget.syntax_style = args.style |
|
245 | widget.syntax_style = args.style |
General Comments 0
You need to be logged in to leave comments.
Login now