##// END OF EJS Templates
-twisted command line opt launches twisted reactor and uses it to execute code given by ipython mainloop thread
Ville M. Vainio -
Show More
@@ -405,7 +405,7 b' class MTInteractiveShell(InteractiveShell):'
405 405 # execute directly (to allow recursion and prevent deadlock if code is run early
406 406 # in IPython construction)
407 407
408 if self.worker_ident is None or self.worker_ident == thread.get_ident():
408 if (self.worker_ident is None or self.worker_ident == thread.get_ident()):
409 409 InteractiveShell.runcode(self,code)
410 410 return
411 411
@@ -1155,10 +1155,13 b' def _select_shell(argv):'
1155 1155 }
1156 1156
1157 1157 all_opts = set(['tk','pylab','gthread','qthread','q4thread','wthread',
1158 'tkthread'])
1158 'tkthread', 'twisted'])
1159 1159 user_opts = set([s.replace('-','') for s in argv[:3]])
1160 1160 special_opts = user_opts & all_opts
1161 1161
1162 if 'twisted' in special_opts:
1163 import twshell
1164 return twshell.IPShellTwisted
1162 1165 if 'tk' in special_opts:
1163 1166 USE_TK = True
1164 1167 special_opts.remove('tk')
@@ -184,10 +184,9 b" object? -> Details about 'object'. ?object also works, ?? prints more."
184 184
185 185 # Options that can *only* appear at the cmd line (not in rcfiles).
186 186
187 # The "ignore" option is a kludge so that Emacs buffers don't crash, since
188 # the 'C-c !' command in emacs automatically appends a -i option at the end.
189 187 cmdline_only = ('help interact|i ipythondir=s Version upgrade '
190 'gthread! qthread! q4thread! wthread! tkthread! pylab! tk!')
188 'gthread! qthread! q4thread! wthread! tkthread! pylab! tk! '
189 'twisted!')
191 190
192 191 # Build the actual name list to be used by DPyGetOpt
193 192 opts_names = qw(cmdline_opts) + qw(cmdline_only)
@@ -245,6 +244,7 b" object? -> Details about 'object'. ?object also works, ?? prints more."
245 244 system_verbose = 0,
246 245 term_title = 1,
247 246 tk = 0,
247 twisted= 0,
248 248 upgrade = 0,
249 249 Version = 0,
250 250 wildcards_case_sensitive = 1,
General Comments 0
You need to be logged in to leave comments. Login now