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
d39aaba1
Commit
d39aaba1
authored
10 years ago
by
Guillaume Valadon
Browse files
Options
Downloads
Plain Diff
Merged in gvaladon/scapy-issues/Issue #329 (pull request #67)
IPython support fixed
parents
45eaa358
7d0e9ca4
No related branches found
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 @
d39aaba1
...
@@ -341,9 +341,18 @@ def interact(mydict=None,argv=None,mybanner=None,loglevel=20):
...
@@ -341,9 +341,18 @@ def interact(mydict=None,argv=None,mybanner=None,loglevel=20):
if
IPYTHON
:
if
IPYTHON
:
banner
=
the_banner
%
(
conf
.
version
)
+
"
using IPython %s
"
%
IPython
.
__version__
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
)
# Old way to embed IPython kept for backward compatibility
ipshell
(
local_ns
=
session
)
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
:
else
:
code
.
interact
(
banner
=
the_banner
%
(
conf
.
version
),
code
.
interact
(
banner
=
the_banner
%
(
conf
.
version
),
local
=
session
,
readfunc
=
conf
.
readfunc
)
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