Skip to content

Commit

Permalink
Add conf.ipython_use_jedi
Browse files Browse the repository at this point in the history
  • Loading branch information
gpotter2 committed Jul 18, 2023
1 parent eec0a2c commit d7abfc8
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
2 changes: 2 additions & 0 deletions scapy/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -729,6 +729,8 @@ class Conf(ConfClass):
#: can be "ipython", "bpython", "ptpython", "ptipython", "python" or "auto".
#: Default: Auto
interactive_shell = "auto"
#: Configuration for "ipython" to use jedi (disabled by default)
ipython_use_jedi = False
#: if 1, prevents any unwanted packet to go out (ARP, DNS, ...)
stealth = "not implemented"
#: selects the default output interface for srp() and sendp().
Expand Down
4 changes: 3 additions & 1 deletion scapy/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -838,7 +838,9 @@ def ptpython_configure(repl):
conf.version)
# As of IPython 6-7, the jedi completion module is a dumpster
# of fire that should be scrapped never to be seen again.
cfg.Completer.use_jedi = False
# This is why the following defaults to False. Feel free to hurt
# yourself (#GH4056) :P
cfg.Completer.use_jedi = conf.ipython_use_jedi
else:
cfg.TerminalInteractiveShell.term_title = False
cfg.HistoryAccessor.hist_file = conf.histfile
Expand Down

0 comments on commit d7abfc8

Please sign in to comment.