Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
S
scapy
Manage
Activity
Members
Plan
Wiki
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Deploy
Releases
Package Registry
Model registry
Operate
Terraform modules
Analyze
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
CodeLinaro
public-release-test-restored
platform
external
scapy
Commits
7d0e9ca4
Commit
7d0e9ca4
authored
10 years ago
by
Guillaume Valadon
Browse files
Options
Downloads
Patches
Plain Diff
IPython support fixed
--HG-- branch : Issue #329
parent
52c65e1d
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
scapy/main.py
+12
-3
12 additions, 3 deletions
scapy/main.py
with
12 additions
and
3 deletions
scapy/main.py
+
12
−
3
View file @
7d0e9ca4
...
...
@@ -341,9 +341,18 @@ def interact(mydict=None,argv=None,mybanner=None,loglevel=20):
if
IPYTHON
:
banner
=
the_banner
%
(
conf
.
version
)
+
"
using IPython %s
"
%
IPython
.
__version__
args
=
[
''
]
# IPython command line args (will be seen as sys.argv)
ipshell
=
IPython
.
Shell
.
IPShellEmbed
(
args
,
banner
=
banner
)
ipshell
(
local_ns
=
session
)
# Old way to embed IPython kept for backward compatibility
try
:
args
=
[
''
]
# IPython command line args (will be seen as sys.argv)
ipshell
=
IPython
.
Shell
.
IPShellEmbed
(
args
,
banner
=
banner
)
ipshell
(
local_ns
=
session
)
except
AttributeError
,
e
:
pass
# In the IPython cookbook, see 'Updating-code-for-use-with-IPython-0.11-and-later'
IPython
.
embed
(
user_ns
=
session
,
banner2
=
banner
)
else
:
code
.
interact
(
banner
=
the_banner
%
(
conf
.
version
),
local
=
session
,
readfunc
=
conf
.
readfunc
)
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment