Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
cython
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Gwenaël Samain
cython
Commits
64801957
Commit
64801957
authored
Mar 11, 2017
by
syrte
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
import_all: skip single underscore
skip single underscore minor restructure
parent
a2a6cccf
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
8 deletions
+9
-8
Cython/Build/IpythonMagic.py
Cython/Build/IpythonMagic.py
+9
-8
No files found.
Cython/Build/IpythonMagic.py
View file @
64801957
...
@@ -95,15 +95,16 @@ class CythonMagics(Magics):
...
@@ -95,15 +95,16 @@ class CythonMagics(Magics):
def
_import_all
(
self
,
module
):
def
_import_all
(
self
,
module
):
mdict
=
module
.
__dict__
mdict
=
module
.
__dict__
if
'__all__'
in
mdict
:
if
'__all__'
in
mdict
:
for
k
in
mdict
[
'__all__'
]:
keys
=
mdict
[
'__all__'
]
if
k
in
mdict
:
self
.
shell
.
push
({
k
:
mdict
[
k
]})
else
:
else
:
raise
AttributeError
(
"'module' object has no attribute '%s'"
%
k
)
keys
=
[
k
for
k
in
mdict
if
not
k
.
startswith
(
'_'
)]
else
:
for
k
,
v
in
mdict
.
items
():
for
k
in
keys
:
if
not
k
.
startswith
(
'__'
):
try
:
self
.
shell
.
push
({
k
:
v
})
self
.
shell
.
push
({
k
:
mdict
[
k
]})
except
KeyError
:
msg
=
"'module' object has no attribute '%s'"
%
k
raise
AttributeError
(
msg
)
@
cell_magic
@
cell_magic
def
cython_inline
(
self
,
line
,
cell
):
def
cython_inline
(
self
,
line
,
cell
):
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment